C
Charlie Brown
What is the advantage of declaring events in #2 over #1. Which one
should be used?
#1
Public Event MyEvent(sender as object, e as eventargs)
Private Sub DoSomething()
RaiseEvent MyEvent(nothing, nothing)
End Sub
#2
Public Delegate Sub MyEventHandler(sender as object, e as eventargs)
Public Event MyEvent as MyEventHandler
Private Sub DoSomething()
RaiseEvent MyEvent(nothing, nothing)
End Sub
should be used?
#1
Public Event MyEvent(sender as object, e as eventargs)
Private Sub DoSomething()
RaiseEvent MyEvent(nothing, nothing)
End Sub
#2
Public Delegate Sub MyEventHandler(sender as object, e as eventargs)
Public Event MyEvent as MyEventHandler
Private Sub DoSomething()
RaiseEvent MyEvent(nothing, nothing)
End Sub