相关疑难解决方法(0)

在C#中将String转换为整数时出现异常


我收到错误:格式异常未处理,输入字符串格式不正确.
对于这一行:

int right = System.Convert.ToInt32(rightAngleTB.Text);
Run Code Online (Sandbox Code Playgroud)

rightAngleTB是TextBox,值Text是"25"(不带"").

我真的没有看到问题:(

c# exception type-conversion

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

c# ×1

exception ×1

type-conversion ×1