c# 类型转换string To float

一、 string To float 简单的例子: float x = 3.14F; string s = x.ToString(); string s = "3.14"; float x = float.Parse(s); 精度问题: float x = float.Parse(s); 在提交小数的时候会出现精度丢失问题,  若是是0.5则没有问题 数据库中也是0.5,可是提交其余小数像 0.2
相关文章
相关标签/搜索