討論串[問題] 父類別轉子類別
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者bantime (景)時間9年前 (2015/11/24 00:20), 編輯資訊
0
0
0
內容預覽:
好吧...我知道這很蠢... public class father. {. public void FatherFunction(). {. Console.WriteLine("this is father");. }. }. public class child : father. {. pu
(還有338個字)

推噓2(2推 0噓 20→)留言22則,0人參與, 最新作者grace0523 (小小)時間9年前 (2015/11/23 23:31), 編輯資訊
0
0
0
內容預覽:
Class father. {}. Class child : father. {}. father f = new child();. Child C1 = (child)f ;//第一種強轉. child C2 = f as child ;//第二種強轉. 除了上述兩種強轉外. 還有什麼方式可以
(還有28個字)
首頁
上一頁
1
下一頁
尾頁