Hi,
I am trying to create a delegate (as a test) for:
Public Overridable ReadOnly Property PropertyName() As String
My intuitive attempt was declaring the delegate like this:
Public Delegate Function Test() As String
And instantiating like this:
Dim t As Test = AddressOf e.PropertyName
But this throws the error:
Method 'Public Overridable ReadOnly Property PropertyName() As String' does not have a signature compatible with delegate 'Delegate Function Test() As String'.
So because I was dealing with a property I tried this:
Public Delegate Property Test() As String
But this throws a compiler error.
So the question is, how do I make a delegate for a property?