title: Representing double values in the exponential format in C#
body: <p>Need to display the values in the floating point format as well as in exponential format<br>
   if the value is greater or equal to 0.01 and less than or equal to 1000
   display in the expotential format else display in the floating format</p>
  
  <p>For eg : 3.230000000 is displayed as 3.23
   0.00001 is displayed as 1E-05</p>
  
  <p>But the problem with my code if number given is 1 then the number is displayed as 1.00. </p>
  
  <pre><code>  if (dValue &gt;= 0.01|| dValue &lt;= 1000.0)
          return (string.Format("{0:0.##E+00}", dValue));
       else
          return (string.Format("{0:F2}", dValue));
  </code></pre>
  
  <p>Please let me know how to check the number does not contain decimal values</p>