title: Double datatype, count decimals after decimal-place
body: <p>Method below should return a answer to "What decimal precision, quantity of trailing numbers, do this (double) value have?". I got it right when the values looks like 5900.43, 5900.043 and so on. When the method recieves 5900.00, it return 0, which is wrong (in my need).</p>
  
  <pre><code>   /// &lt;summary&gt;
     /// Return count of decimals after decimal-place 
     /// &lt;/summary&gt;
     private int getDecimalCount(double val)
     {
          int count = 0;
          ...
          return count;
     }
  </code></pre>
  
  <p>When parameter 'val' is (samples of normal values to this method)</p>
  
  <p>5900.00 return 2<br>
  5900.09 return 2<br>
  5900.000 return 3<br>
  5900.001 return 3<br>
  1.0 return 1<br>
  0.0000005 return 7<br>
  1.0000000 return 7<br>
  5900822 return 0<br></p>
  
  <p>My problem is counting .0 .00 .000 and so on</p>
  
  <p>Question:<br>
  How do I solve this? If this method isn't possible with doubles, how else?</p>
  
  <p>[EDITED]<br>
  - Minor text change to make a more clear question,<br>
  - Language correction due to miss-used meaning of 'decimal places'</p>