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 like this
string s = "2.4200"; s = s.TrimStart('0').TrimEnd('0', '.');
and then convert that to float