M
mono
Hi,
Target.ParametricMethod(AddressOf Me.MyTest)
doesn't compile, producing the error:
"reference to a non-shared member requires an object reference" whereas
Target.ParametricMethod(AddressOf MyTest)
does compile. In both case that call is made from a non-shared method.
MyTest is not shared. If I make MyTest shared (not workable for me) then
both forms compile.
Target is an instance of a class with these members:
Public Delegate Function KeyTest(ByVal sKey As String) As Boolean
Public Sub ParametricMethod(ByVal oKeyTest As KeyTest)
...
End Sub
and Me is an instance of a class with member:
Public Function MyTest(ByVal oString As String) As Boolean
Isn't Me.MyTest synonymous with MyTest?? Is there something special about
the AddressOf context?
michael
Target.ParametricMethod(AddressOf Me.MyTest)
doesn't compile, producing the error:
"reference to a non-shared member requires an object reference" whereas
Target.ParametricMethod(AddressOf MyTest)
does compile. In both case that call is made from a non-shared method.
MyTest is not shared. If I make MyTest shared (not workable for me) then
both forms compile.
Target is an instance of a class with these members:
Public Delegate Function KeyTest(ByVal sKey As String) As Boolean
Public Sub ParametricMethod(ByVal oKeyTest As KeyTest)
...
End Sub
and Me is an instance of a class with member:
Public Function MyTest(ByVal oString As String) As Boolean
Isn't Me.MyTest synonymous with MyTest?? Is there something special about
the AddressOf context?
michael