Updated project.
[mono.git] / mcs / btests / Optional_ParamArrayC1.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 \r
8 Option Strict Off\r
9 Imports System\r
10 Module PA_1_0_0\r
11    Sub F(Optional ParamArray args() As Integer = {0,0,0})\r
12       Console.Write("Array contains " & args.Length & " elements:")\r
13       if (args.Length <> 3)\r
14                 Throw New System.Exception("#A1, Unexcepted behaviour in string of OP1_0_1")\r
15         end if \r
16    End Sub\r
17    Sub Main()\r
18       Dim a As Integer() = { 1, 2, 3 }\r
19       F(a)\r
20       F(10, 20, 30)\r
21       \r
22    End Sub\r
23 End Module\r
24 '=============================================================================================\r