c# - Decimal to string conversion issues -
c# - Decimal to string conversion issues -
possible duplicate: c# how remove 0 end of decimal value best way display decimal without trailing zeros in c#
i have decimal variable has value
2.50 2.25
how can convert string can get
2.5 2.25
issue 2.50 must 2.5 in string.
string.format("{0:0.##}", 2.50);
you can convert string , string.trim('0');
trim trailing zeros off.
c# decimal
Comments
Post a Comment