G
Gareth
Hi,
I'd like to do be able to implement an interface in a derived class by
relying on the base class for some of the members. For example like
this:
Interface ITest
Property prpA() As Integer
Property prpB() As Integer
End Interface
Public MustInherit Class BaseClass
Public Property prpA() As Integer
Get
Return 1
End Get
Set(ByVal Value As Integer)
End Set
End Property
End Class
Public Class DerivedClass
Inherits BaseClass
Implements ITest
Public Property prpB() As Integer Implements ITest.prpB
Get
Return 0
End Get
Set(ByVal Value As Integer)
End Set
End Property
End Class
But the compiler doesn't recognise prpA as being present in
DerivedClass. Can anyone tell me how I could get round this, and also
why it should be that this is not allowed?
Thanks,
Gareth
I'd like to do be able to implement an interface in a derived class by
relying on the base class for some of the members. For example like
this:
Interface ITest
Property prpA() As Integer
Property prpB() As Integer
End Interface
Public MustInherit Class BaseClass
Public Property prpA() As Integer
Get
Return 1
End Get
Set(ByVal Value As Integer)
End Set
End Property
End Class
Public Class DerivedClass
Inherits BaseClass
Implements ITest
Public Property prpB() As Integer Implements ITest.prpB
Get
Return 0
End Get
Set(ByVal Value As Integer)
End Set
End Property
End Class
But the compiler doesn't recognise prpA as being present in
DerivedClass. Can anyone tell me how I could get round this, and also
why it should be that this is not allowed?
Thanks,
Gareth