title: String to Binary in C#
body: <p>I have a function to convert string to hex as this,</p>
  
  <pre><code>public static string ConvertToHex(string asciiString)
  {
      string hex = "";
      foreach (char c in asciiString)
      {
           int tmp = c;
           hex += String.Format("{0:x2}", (uint)System.Convert.ToUInt32(tmp.ToString()));
      }
      return hex;
  }
  </code></pre>
  
  <p>Could you please help me write another string to Binary function based on my sample function? </p>
  
  <pre><code>public static string ConvertToBin(string asciiString)
  {
      string bin = "";
      foreach (char c in asciiString)
      {
          int tmp = c;
          bin += String.Format("{0:x2}", (uint)System.Convert.????(tmp.ToString()));
      }
      return bin;
  }
  </code></pre>