my data return string (always 9 character) as following,
000005330
000004110
000041660
how my GridView display above value into decimal. the expected result as following,
53.30
41.10
416.60
------------------------
000005330
000004110
000041660
how my GridView display above value into decimal. the expected result as following,
53.30
41.10
416.60
------------------------
Sample solution
string a = "000005330";
a = a.Insert(a.Length - 2, ".");
float num = float.Parse(a);
string a = "000005330";
a = a.Insert(a.Length - 2, ".");
float num = float.Parse(a);
No comments:
Post a Comment