格式化异常,Unity3d,要解析的字符串

时间:2019-01-03 12:48:44

标签: c# unity3d exception int formatexception

我创建了两个变量

每次我运行以下代码时,都会出现以下异常。

  

FormatException:输入字符串的格式不正确   System.Int16.Parse(System.String)。

我尝试过TryParse()System.Int32.Parse(),使用try/catch方法。

private string table;
private int num;

//Then, I am trying to Parse it like that:
num = int.Parse(table);

当我使用num = System.Int32.int.Parse(table);

它不显示与num关联的文本。

0 个答案:

没有答案
相关问题