Corrected GotoStatementA.vb and removed ^M in all tests
[mono.git] / mcs / mbas / Test / tests / DefaultPropD.vb
1 'Author:
2 '   V. Sudharsan (vsudharsan@novell.com)
3 '
4 ' (C) 2005 Novell, Inc.
5
6 Imports System
7
8 Class base
9         Public Default ReadOnly Property Item(ByVal i as Integer)As Integer
10                 Get                     
11                         Return i
12                 End Get
13         End Property
14         Public Default ReadOnly Property Item(ByVal i as Integer,ByVal j as Integer)As Integer
15                 Get                     
16                         Return i+j
17                 End Get
18         End Property
19 End Class
20
21 Class derive
22         Inherits base
23         Public Overloads Default ReadOnly Property Item(ByVal i as Integer)As Integer
24                 Get                     
25                         Return 2*i
26                 End Get
27         End Property
28 End Class
29
30 Module DefaultA
31         Sub Main()
32                 Dim a as derive=new derive()
33                 Dim i,j as Integer      
34                 i=a(10)
35                 j=a(10,20)
36                 if i<>20 Then
37                         Throw New Exception("Default Not Working")
38                 End If
39                 if j<>30 Then
40                         Throw New Exception("Default Not Working")
41                 End If
42         End Sub
43 End Module