title: Extend Convert.ToString() to pad binary output
body: <p>I can use <code>Convert.ToString</code> to convert an integer to its binary representation:</p>
  
  <pre><code>int x = 10;
  string value = Convert.ToString(x, 2);
  Console.WriteLine(value);
  </code></pre>
  
  <p>I get <code>1100</code>.</p>
  
  <p>It can even handle negative numbers, as I get <code>111...0110</code> (32 bits).</p>
  
  <pre><code>int x = -10;
  string value = Convert.ToString(x, 2);
  Console.WriteLine(value);
  </code></pre>
  
  <p>How can I extend this function so that I can give third parameter to get the result with bit filled with 0 (positive value) or 1 (negative value)?</p>
  
  <p>For example, with <code>Convert.ToString(10, 2, 5)</code> --> <code>01100</code>, and <code>Convert.ToString(-10, 2, 5)</code> --> <code>10110</code>.</p>