I have some fields returned by a collection as
2.4200 2.0044 2.0000
I want results like
2.42 2.0044 2
I t
try this code:
string value = "100"; value = value.Contains(".") ? value.TrimStart('0').TrimEnd('0').TrimEnd('.') : value.TrimStart('0');