title: Show decimal value upto nth places in c#
body: <p>I know we can display decimals up to certain no of places (if that no of places is fixed). For example, we can display up to 2 places using <code>String.Format</code>:</p>
  
  <pre><code>String.Format("{0:0.00}", 123.4567); 
  </code></pre>
  
  <p>But our requirement is, we have to fetch no of decimal places from database and display the decimal value up to that place. For example:</p>
  
  <pre><code>int n=no of decimal places
  </code></pre>
  
  <p>I want to write something like:</p>
  
  <pre><code>String.Format("{0:0.n}", 123.4567);
  </code></pre>
  
  <p>Any suggestions would be of great help.</p>
  
  <p>Added Note: <code>String.Format</code> rounds off the digit. I am looking for something to omit the remaining digits.</p>