The warning is quite informative, you have a property and a function that both use the same name and therefore cause ambiguity. Consider the following example which causes the same warning
Public Class BaseClass
Public Property SomeFunctionality As String
Get
Return ""
End Get
Set(value As String)
End Set
End Property
End Class
Public Class InheritedClass
Inherits BaseClass
Public Function SomeFunctionality() As String
End Function
End Class
One way to remove the warning is to define the shadows (which is actually automatically defined for you in this case). For example
Public Class InheritedClass
Inherits BaseClass
Public Shadows Function SomeFunctionality() As String
End Function
End Class
But in my opinion the correct solution would be to use different names. If you define the Shadows keyword you deliberately hide functionality and that's not probably what you want in the end.
So the fixed code should look like
Public Class BaseClass
Public Property SomeFunctionality As String
Get
Return ""
End Get
Set(value As String)
End Set
End Property
End Class
Public Class InheritedClass
Inherits BaseClass
Public Function AnotherFunctionality() As String
End Function
End Class
For more information, have a look at
-
Default property '<propertyname1>' conflicts with default property '<propertyname2>' in '<classname>' and so should be declared 'Shadows'[
^]
-
Shadows (Visual Basic)[
^]