Hi
I have a class with a event
This works fine if i have only one instance of that class.Code:Public Class MyClass Public Event MyEvent(ByVal Argument As String) Private Sub Whatever() RaiseEvent MyEvent("My Argument") end sub End Class
The problem is that when i have more than one instance of this class like this:
the .NET frameworks triggers a "System.NullReferenceException"Code:Private Sub IwDataGrid1_CellDoubleClick(ByVal Argument As String) Handles MyClassInstance1.MyEvent MsgBox(Argument ) End Sub Private Sub IwDataGrid2_CellDoubleClick(ByVal Argument As String) Handles MyClassInstance2.MyEvent MsgBox(Argument ) End Sub
I would be gratefull if someone could explain me why this happens and how can i solve this problem!


Reply With Quote
