Re: [問題] C# null
※ 引述《light0617 (遺忘的~光)》之銘言:
: for (int i = 1; i < 10; i++)
: {
: bottom.num = list[i];----------->他說問題在這
: bottom.next =null;
: walk = bottom;
: bottom = bottom.next;
: }
1. bottom.next = null;
2. bottom = bottom.next;
導致 bottom 等於 null
解決方法之一
bottom.next = new box();
不過我不確定這是不是你要的結果
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.127.184.214
推
11/02 00:36, , 1F
11/02 00:36, 1F
→
11/02 00:37, , 2F
11/02 00:37, 2F
推
11/02 00:52, , 3F
11/02 00:52, 3F
→
11/02 00:53, , 4F
11/02 00:53, 4F
→
11/02 00:53, , 5F
11/02 00:53, 5F
討論串 (同標題文章)