討論串[C#]請問如何在一個建構子中呼叫另一個建構子?
共 4 篇文章
首頁
上一頁
1
下一頁
尾頁
內容預覽:
印象中可以用這種方式. class A. {. public A(). {. }. public A(int i):this(). {. }. }. ※ 引述《mygame.bbs@bbs.ccns.ncku.edu.tw (逛逛)》之銘言:. > 如下程式碼:. > class A. > {. >
(還有160個字)
內容預覽:
※ mygame.bbs@bbs.ccns.ncku.edu.tw (逛逛) wrote:. > 如下程式碼:. > class A. > {. > public A(). > {. > }. > public A(int i). > {. > // A() <- error. > }. > }.
(還有258個字)
內容預覽:
如下程式碼:. class A. {. public A(). {. }. public A(int i). {. // A() <- error. }. }. 要在第二個建構子中呼叫第一個要怎麼做呢?. 謝謝回答~. --. ╮═╦═╮╮ ╭╭═╮╭═╮╮═╦═╮╭═╮Don't hold me
(還有287個字)
首頁
上一頁
1
下一頁
尾頁