In C# I can test for this...
public event EventHandler Trigger;
protected void OnTrigger(EventArgs e)
{
if (Trigger != null)
Trigger(this, e);
}
Yes. null is called "Nothing" in Visual Basic.
If Trigger IsNot Nothing Then
The above answer describes how to check something for null in VB .NET. Unfortunately, events are handled special by the VB.NET compiler.
For this event definition:
Public Event Trigger as EventHandler
You would use this code to check for subscriptions
If TriggerEvent Is Nothing
Notice how VB.Net added a field with the suffix Event
to represent the delegate. Have a look here for an explanation.