title: How to pad a binary string with zeros?
body: <pre><code>string binary = Convert.ToString(15, 2);
  
  Console.WriteLine("{0}", binary);
  </code></pre>
  
  <p>Prints:</p>
  
  <p><code>1111</code></p>
  
  <p>I want it to print <code>00001000</code></p>
  
  <p>Because the data type is of string and not integer I cannot do something like this:</p>
  
  <pre><code>Console.WriteLine("{0:00000000}", binary);
  </code></pre>