title: ToString.Format for decimals but only if needed
body: <p>I have this property value and i need its string value as its being recorded in a XML which is read from.</p>
  
  <p>Now my problem is that when I do:</p>
  
  <p>Example value is 1.0</p>
  
  <pre><code>MyProperty.StringValue.ToString 
  </code></pre>
  
  <p>gives 1</p>
  
  <p>how can I get this value to be in a string format but diplay the full entered 1.0 </p>
  
  <p>I have tried </p>
  
  <pre><code>MyProperty.StringValue.ToString.Format("D")
  </code></pre>
  
  <p>which gives D</p>
  
  <p>bearing in mind I need any value that was entered to come out as it is ...</p>
  
  <p>when I have for example 1.5 its comes back as 1.5 </p>
  
  <p>it only happens with 0 on the other side...</p>
  
  <p>EXAMPLES </p>
  
  <p>I dont understand what is exactly needed by more examples.... Its very simple.... </p>
  
  <p>User input is 1.0
  the value is then converted to string 
  and it drops the 0
  so in the end is just 1
  thats wrong because it is string it should reflect the value entered exactly as it is .</p>
  
  <p>now if I entered 1.5
  the value is then converted to string 
  and in the end it comes back with 1.5 
  thats ok , becuase it was entered like that</p>
  
  <p>If i entered 132
  the value is then converted to string 
  and should and does come back as 132</p>
  
  <p>hope this is enough </p>