title: Using custom string format for decimal number c#
body: <p>I got a decimal values with 4 decimal places in database, but I need to display the format with thousand separator without 0 appears in behind. I have try out G, F, N format but I have no clues on the result that I want.</p>
  
  <pre><code>1234.3456          // 1,234.3456
  1234.0000          // 1,234.00
  1234.3450          // 1,234.345
  1234.345678        // 1,234,3457
  1234               // 1,234.00
  1234.2             // 1,234,20
  </code></pre>