2004-11-08 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / btests / StructureA.vb
1 Imports System
2
3 Structure S
4         Dim a as String
5         Const b as integer = 25
6
7         Class c
8         End class
9
10         Function f(l as long) as long
11                 f = l
12         End Function
13
14         Structure S1
15                 dim g as string
16         End Structure
17
18 End Structure
19
20
21 Module M
22         Sub Main()
23                 dim x as S
24
25                 x.a = 10
26                 If x.a <> 10 then
27                         Throw new Exception ("#A1, Unexpected result")
28                 End If
29
30                 dim y as S = x
31
32                 x.a = 20
33                 If y.a <> 10 then
34                         Throw new Exception ("#A2, Unexpected result")
35                 End If
36                 If x.a <> 20 then
37                         Throw new Exception ("#A3, Unexpected result")
38                 End If
39
40                 If x.b <> 25 then
41                         Throw new Exception ("#A4, Unexpected result")
42                 End If
43                 'Console.WriteLine(x.b)
44
45                 If x.f(99) <> 99 then
46                         Throw new Exception ("#A5, Unexpected result")
47                 End If
48
49         End Sub
50 End Module