2005-01-31 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mcs / mbas / Test / tests / 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    Sub F(ParamArray args() As Integer)\r
10         Dim a as Integer\r
11         a=args.Length\r
12         if a=0\r
13                 Throw New System.Exception("#A1, Unexcepted behavoiur of PARAM ARRAY")\r
14         end if\r
15    End Sub\r
16    Sub Main()\r
17       Dim a As Integer() = { 1, 2, 3 }\r
18       F(a)\r
19       F(10, 20, 30, 40)\r
20    End Sub\r
21 End Module\r
22 '=============================================================================================