亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

如何實現接口數組化 輸出有共同愛好的寵物

59e5fa810001d93d10010751.jpg59e5fa800001620b10010751.jpg

59e5fa810001207910010751.jpg
59e5fa81000177e710010751.jpg

正在回答

1 回答

?Interface1[] intt = new Interface1[] { new Dog("dddddd") };
??????????? for (int i = 0; i < intt.Length; i++)
??????????? {
??????????????? intt[i].GGG();
??????????? }

?interface Interface1
??? {
??????? void GGG();
??? }

?class Dog : Pet,Interface1

{

?public void GGG()
??????? {
??????????? Console.WriteLine("爬樹");
??????? }

}

?Interface1[] intt = new Interface1[] { new Dog("dddddd") };
??????????? for (int i = 0; i < intt.Length; i++)
??????????? {
??????????????? intt[i].GGG();
??????????? }

http://img4.sycdn.imooc.com/59e718c2000150b003330072.jpg

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

如何實現接口數組化 輸出有共同愛好的寵物

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號