2005-01-31 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mcs / mbas / Test / tests / EventF.vb
1 Imports System
2
3 Class C
4         Delegate Sub EH()
5         Public Event E as EH
6
7         Public Sub S()
8                 RaiseEvent E
9         End Sub
10
11         Sub bxh() 
12                 Console.WriteLine("event called from other class")
13         End Sub
14 End Class
15
16 Class C1
17         Sub call_S()
18                 dim x as C = new C()
19                 AddHandler x.E, AddressOf Me.xh
20                 AddHandler x.E, AddressOf x.bxh
21                 x.S()
22         End Sub
23
24         Sub xh() 
25                 Console.WriteLine("event called")
26         End Sub
27 End Class
28
29 Module M
30         Sub Main()
31                 dim y as new C1
32                 y.call_S()
33         End Sub
34
35 End Module