G
Guest
I created a Mustinherit class with two must override readonly properties:
Public MustInherit Class RequestPart
Public MustOverride ReadOnly Property Description() As Boolean
Public MustOverride ReadOnly Property Mandatory() As String
End Class
I the derived class I cannot override the property Mandatory because the
return types differ:
Public Class Login
Inherits RequestPart
Private _Username As String
Private _Password As String
Private _Description As String
Public ReadOnly Property Description() As String
Get
Return _Description
End Get
End Property
Public ReadOnly Property Mandatatory() As Boolean
Get
Return True
End Get
End Property
and so on....
Why do I get the error that the return types differ?
Public MustInherit Class RequestPart
Public MustOverride ReadOnly Property Description() As Boolean
Public MustOverride ReadOnly Property Mandatory() As String
End Class
I the derived class I cannot override the property Mandatory because the
return types differ:
Public Class Login
Inherits RequestPart
Private _Username As String
Private _Password As String
Private _Description As String
Public ReadOnly Property Description() As String
Get
Return _Description
End Get
End Property
Public ReadOnly Property Mandatatory() As Boolean
Get
Return True
End Get
End Property
and so on....
Why do I get the error that the return types differ?