How can I check if an event will be raised in VB.NET? I seem to be able to do it in C#, but not in VB, even though I'm using the same syntax.
Here's my VB.NET syntax (which returns an error)
If [EVENT] IsNot Nothing Then
End If
And here's my C# syntax (works perfectly)
If([EVENT] != null) //If an event is not null(nothing)
{
}
Here's the error that the VB code returns
"[EVENT] is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event."