我已經有一段時間了困擾這個,這是我的代碼:這條線爲什麼會拋出異常?
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