I'm getting this error when trying to implement an interface in vb.net:
Public Interface IFoo
ReadOnly Property Foo() As String
End Interface
Public Class myFoo
Implements IFoo
Public ReadOnly Property Foo() As String
Get
return "Foo"
End Get
End Property
...
End Class
What is missing?
You will want to tell the code that the myFoo.Foo
implements the IFoo.Foo
(notice the added Implements IFoo.Foo
):
Public Interface IFoo
ReadOnly Property Foo() As String
End Interface
Public Class myFoo
Implements IFoo
Public ReadOnly Property Foo() As String Implements IFoo.Foo
Get
Return "Foo"
End Get
End Property
End Class
As far as I know, VB.NET does not support implicit interface implementations in the same way as C# does.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With