討論串[問題] C# null
共 4 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓1(1推 0噓 0→)留言1則,0人參與, 最新作者james732 (好人超)時間16年前 (2009/11/02 00:58), 編輯資訊
0
0
0
內容預覽:
在C#裡,只要你是用class定義的東西,一定都要建立實體才能用. 譬如說:. class box {. public box() {}. public char num;. public box next;. }. 某個函式:. {. box b = new box();. b.num = 'a'
(還有5個字)

推噓2(2推 0噓 3→)留言5則,0人參與, 最新作者james732 (好人超)時間16年前 (2009/11/01 23:33), 編輯資訊
0
0
0
內容預覽:
1. bottom.next = null;. 2. bottom = bottom.next;. 導致 bottom 等於 null. 解決方法之一. bottom.next = new box();. 不過我不確定這是不是你要的結果. --. 發信站: 批踢踢實業坊(ptt.cc). ◆ F

推噓0(0推 0噓 2→)留言2則,0人參與, 最新作者light0617 (遺忘的~光)時間16年前 (2009/11/01 21:50), 編輯資訊
0
0
0
內容預覽:
未處理的例外狀況 System.NullReferenceException:並未將物件參考設定為物件的. 的執行個體. 請為各位大大. 這是什麼意思. 我的類別. class box. {. public box() { }. public char num;. public box next;.
(還有390個字)

推噓1(1推 0噓 6→)留言7則,0人參與, 最新作者light0617 (遺忘的~光)時間16年前 (2009/11/01 16:07), 編輯資訊
0
0
0
內容預覽:
在C++中常常看到. 鏈結串列最後面的一個都接上NULL. 可是C#好像不能這樣用. 請問C#中的NULL要改成什麼才能代表結束的意思. 例如. while (walk != null). {. Console.WriteLine(walk.num);. walk = walk.next;. }.
(還有3個字)
首頁
上一頁
1
下一頁
尾頁