8 callable MyEvent(sender
as object
, e
as EventArgs
)
10 class GenericFoo
[of T
]:
11 event AnExternalEvent
as EventHandler
12 event AnInternalEvent
as MyEvent
15 AnExternalEvent(self, EventArgs
.Empty
)
16 AnInternalEvent(self, EventArgs
.Empty
)
18 def OnExternalEvent(sender
as object
, e
as EventArgs
):
19 print "OnExternalEvent"
21 def OnInternalEvent(sender
as object
, e
as EventArgs
):
22 print "OnInternalEvent"
24 foo
= GenericFoo
[of string
]()
25 foo
.AnExternalEvent
+= OnExternalEvent
26 foo
.AnInternalEvent
+= OnInternalEvent