110,536
社区成员
发帖
与我相关
我的任务
分享
public static float ToFloat(this string str)
{
float i = 0f;
float.TryParse(str, out i);
return i;
}
if (string.IsNullOrEmpty(textBox1.Text))
{
textBox1.Text=“0”;
}
float a=Convert.ToSingle(textBox1.Text);