代码如下(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.
添加回答
举报
0/150
提交
取消