我已经有一段时间了困扰这个,这是我的代码:这条线为什么会抛出异常?
TILArray = new string[Width, Height];
int t = 0;
TILArray[t, t] = "";
TILArray[t, t] = "";
for (int x = 0; x < Width; x++)
{
for (int y = 0; y < Height; y++)
{
if (TILList[x][y] != null)
{
TILArray[0, 0] = TILList[x][y];
Tiles[x, y] = Content.Load<Tile>(TILList[x][y]);
}// This line throws the excetion
}
}
抛出异常实际上是上面标明正确的花括号线。
类型“System.NullReferenceException”的未处理的异常发生在TileEngine.dll
其他信息:对象没有设置为一个对象的一个实例。
什么异常? –
哦对不起编辑它在 – annonymously
这是在发布模式或调试模式? – Mehrdad