title: Format decimal to number of decimal places without scientific notation
body: <p>I am currently formatting a double using the code:</p>
  
  <pre><code>myDouble.ToString("g4");
  </code></pre>
  
  <p>To get the first 4 decimal places. However I find this often switches over to scientific notation if the number is very large or very small. Is there an easy format string in C# to just have the first four decimal places, or zero if it is too small to be represented in that number of places?</p>
  
  <p>For example, I would like:</p>
  
  <pre><code>1000 =&gt; 1000
  0.1234567 =&gt; 0.1235
  123456 =&gt; 123456 (Note: Not scientific notation)
  0.000001234 =&gt; 0 (Note: Not scientific notation)
  </code></pre>