Open omkar9194 opened 9 months ago
By default trailing zeroes are truncated when decimals are converted to string representation. We are discussion potential enhancement in this PR https://github.com/shopspring/decimal/pull/296
In the meantime, you can use d.StringFixed(2)
if you only want printing 2 decimal places
I find that if we do var zero = decimal.FromString("0.00") Then print zero/ assign it to string after conversion, Instead of printing 0.00, 0 is printed.
Similarly if we do var seventy = decimal.FromString("0.70") Then print zero/ assign it to string after conversion, Instead of printing 0.70, 0.7 is printed.
Is there a pre-existing solution for this? If not, can this be added as a feature?