我听说使用异常捕获不是数字测试的推荐做法.
例如:
bool isnumeric try { int i = int.parse(textbox1.text); isnumeric = true; } catch {isnumenric=false}
还有其他方法可以测试C#中的数字吗?
c#
c# ×1