-
-
Save AnthonyDGreen/422ac4574af92d9bbbf59f0fbc40b74d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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