[問題] 物件參考設定
不好意思 我想在程式中改變參考的物件 應該怎麼做?
下面的code在執行時會出現"並未將物件參考設定為物件的執行個體"
private char[] tempStudentAns;
private string[] noAns;
private char[] analyAns;
------------------------------------------------------------------------------
string[] tempStr;
tempStudentAns = tempStr[3].ToCharArray();
for (int i = 0; i < tempStudentAns.Length; i++)
noAns[i] += tempStudentAns[i];
for (int i = 0; i < noAns.Length; i++) //出現錯誤的部分
analyAns = noAns[i].ToCharArray(); //想隨著程式進行 改變analyAns的參考物件
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.228.81.178
※ 編輯: bluela 來自: 61.228.81.178 (06/18 21:05)
→
06/18 21:25, , 1F
06/18 21:25, 1F
→
06/18 21:39, , 2F
06/18 21:39, 2F
→
06/18 22:36, , 3F
06/18 22:36, 3F
→
06/18 23:39, , 4F
06/18 23:39, 4F
討論串 (同標題文章)