this test is fully functional now
[mono.git] / mcs / btests / DelegateA.vb
1 Imports System
2
3 Module M
4         Delegate Sub SD()
5         sub f()
6         End sub
7
8         Public Delegate Function SF(a as integer) as Integer
9         Public Function f1(a as integer) as Integer
10                 return a
11         End Function
12
13         Sub Main()
14                 dim d1 as SD 
15                 d1 = new SD(AddressOf f)
16                 d1.Invoke()
17
18                 dim d2 as SD
19                 d2 = AddressOf f 
20                 d2.Invoke()
21
22                 dim d3 as new SD(AddressOf f)
23                 d3.Invoke()
24
25                 dim d4 as SF
26                 d4 = new SF(AddressOf f1)
27                 Dim i as Integer = d4.Invoke(10)
28                 if i <> 10 then
29                         Throw new System.Exception ("#A1, Unexpected result")
30                 end if
31
32                 
33         End Sub
34 End Module