Skip to content

Instantly share code, notes, and snippets.

@AnthonyDGreen
Created February 3, 2019 13:04
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save AnthonyDGreen/422ac4574af92d9bbbf59f0fbc40b74d to your computer and use it in GitHub Desktop.
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