C#中出现错误 CS0029: 无法将类型“string”隐式转换为“int“怎么解决?

2025-05-14 12:41:13
推荐回答(1个)
回答1:

无法隐式转换,可以考虑强制转换
用 int.Parse(string)
或者int.TryParse(string, out int)