remove svn:executable property from *.vb
[mono.git] / mcs / mbas / Test / tests / Function_ParamArrayB.vb
1 '============================================================================================\r
2 'Name:Manish Kumar Sinha \r
3 'Email Address: manishkumarsinha@sify.com\r
4 'Test Case Name: ParamArray:\r
5 'APR-1.0.0: ParamArray can be used only on the last argument of argument list. it allows us to 'pass an arbitrary list. It allows us to pass an arbitrary number of argument to the procedure \r
6 '=============================================================================================\r
7 Imports System\r
8 Module PA_1_0_0\r
9    Function F(ParamArray args() As Integer)as Integer\r
10       Dim a as integer\r
11         a = args.Length\r
12         return a\r
13    End Function\r
14    Sub Main()\r
15       Dim a As Integer() = { 1, 2, 3 }\r
16       Dim b as Integer\r
17         b= F(a)\r
18         if b<>3\r
19                 Throw New System.Exception("#A1, Unexcepted Behaviour in F(a)")\r
20         end if\r
21 \r
22       b = F(10, 20, 30, 40)\r
23         if b<>4\r
24                 Throw New System.Exception("#A2, Unexcepted Behaviour in F(10,20,30,40)")\r
25         end if\r
26       b = F()\r
27         if b<>0\r
28                 Throw New System.Exception("#A3, Unexcepted Behaviour in F()")\r
29         end if\r
30    End Sub\r
31 End Module\r
32 '=============================================================================================