Remove decimal points from a decimal variable if it has .00 : <p>I have a decimal variable and would like to convert it to a string by removing decimal points if it is .00.</p>

<p>For example, I have 23.00 and 25.1458 and I would like both these variables to strings as 23 and  25.1</p>

<p>I am using string conversion <code>string temp =&gt; $"{value:n0}"</code> but this one removes decimal points for the later variable too (25.1458) instead I just want to trim only .00 decimals</p>
