C#中如何将 字符转换为整型?

如题 希望给出格式例子
String str = Console.ReadLine();
studentArray[0].intId = int.Parse(str);

为什么不对?

第1个回答  2009-03-02
怎么个不对法?studentArray[0].intId是整型吗?输入内容是数字吗?
相似回答