第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

關(guān)于c#/vb.net 的問題,如果list類型作為屬性編譯不通過的錯誤?

關(guān)于c#/vb.net 的問題,如果list類型作為屬性編譯不通過的錯誤?

開心每一天1111 2021-05-18 18:11:52
代碼如下(vb.net)//Piece是我自定義的一個很簡單的類。//這代碼是在另外一個類里面Private m_Pieces As List(Of Piece)Public Property Pieces() As List(Of Piece)GetReturn m_PiecesEnd GetSet(ByVal value As List(Of Piece))m_Pieces = valueEnd SetEnd Property編譯錯誤:Public Property Pieces As System.Collections.Generic.List(Of Piece)”和“Public Property Pieces As System.Collections.Generic.List(Of Procedure)”的差異僅在于返回類型,因此它們無法重載對方。英文版錯誤:You have attempted to overload a method with another method that differs from the first only in its return type. In overloading, you must differentiate any two versions of a method by their argument lists; you cannot use anything other than argument lists to differentiate the methods.
查看完整描述

1 回答

?
侃侃無極

TA貢獻2051條經(jīng)驗 獲得超10個贊

這個另外的類有一個基類吧,你重載了Pieces屬性但是返回了與基類不同的類型,所以出錯了

查看完整回答
反對 回復 2021-05-23
  • 1 回答
  • 0 關(guān)注
  • 287 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號