Answers for "c# remove trailing zeros until 2 decimal"

C#
1

how to display doubles with trailing zeros in c#

int numDigitsAfterPoint = 5;
double num = 1.25d;
string result = num.ToString("0." + new string('0', numDigitsAfterPoint));
Posted by: Guest on January-17-2021

Code answers related to "c# remove trailing zeros until 2 decimal"

C# Answers by Framework

Browse Popular Code Answers by Language