Class MyEventArgs | |
Property Value As Object | |
End Class | |
Structure MyStruct | |
Public X, Y As Integer | |
End Structure | |
Module Program | |
Sub Main() | |
Dim defaultValue As Object = New MyStruct With {.X = 3, .Y = 5} | |
Dim e = New MyEventArgs With {.Value = defaultValue} | |
RaiseEvent DoSomething(Nothing, e) | |
If e.Value Is defaultValue Then | |
' No handlers have changed anything. | |
Console.WriteLine("Unchanged.") | |
End If | |
End Sub | |
Event DoSomething(sender As Object, e As MyEventArgs) | |
End Module |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment