How to check if an event will be raised in VB.NET? It seems I can do it in C #, but not in VB, although I use the same syntax.
Here is my VB.NET syntax (which returns an error)
If [EVENT] IsNot Nothing Then
End If
And here is my C # syntax (works fine)
If([EVENT] != null) //If an event is not null(nothing)
{
}
Here's the error that VB code returns
"[EVENT] is an event and cannot be called directly. Use the RaiseEvent expression to create an event.
source
share