title: Remove Insignificant decimal places when converted to string (C#)
body: <p>I have a property which has decimal datatype let's say "Interest" then I have another property of string type let's say "InterestString". </p>
  
  <p><strong>Properties</strong></p>
  
  <pre><code> public decimal Interest { get; set; }
   public string InterestString { get; set; }
  </code></pre>
  
  <p>I want to assign the value of Interest to InterestString so I did the following. For example lets assume Interest has a value of 4 (without decimal places):</p>
  
  <pre><code>InterestString = Interest.ToString();
  </code></pre>
  
  <p>If the conversion finished my <code>InterestString</code> becomes "4.000" but the value of my Interest is only 4 without .0000.</p>
  
  <p>I want to retain the format even after conversion. How can I get rid of those insignificant decimal places?</p>
  
  <p>If I do something like this</p>
  
  <pre><code>InterestString = Interest.ToString("N0");
  </code></pre>
  
  <p>It will give me InterestString="4";<code>But what if I have Interest 4.5? This will give me</code>InterestString = "5"` (rounded to ten).</p>
  
  <p>If I do <code>Interest.ToString("N2")</code> that would give me still 2 insignificant decimal places. The behavior that I want is remove the insignficant decimal places.</p>
  
  <p>Please help.</p>