Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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.
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