Delegates in VB.NET
Today I had use VB.NET to alter a gui component, and got
curious about the usage of delegates for events.
When inheriting a class and wanting to "pass along" this class events it
seems as one have to use something called shadows.
Public MyClass Inherits
SomeClassThatImplementsTheClickEvent
Public Shadows Event Click(ByVal
sender As Object, ByVal e as EventArgs)
End Class
I would assume that the delegate type would be the same as for the base
class, but it's not. When inspecting the resulting dll with the Object browser I
found that it was created a "MyClass.EventNameEventHandler", aka
"MyClass.ClickEventHandler" delegate for this event.
Is it correct that compiling VB.NET code generates a custom delegate, and if
so why?