2004-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
[mono.git] / mcs / btests / ParamArrayA.vb
1 '============================================================================================\r
2 'Name:Manish Kumar Sinha \r
3 'Email Address: manishkumarsinha@sify.com\r
4 'Test Case Name: Param Array:\r
5 'APR-1.2.1: If ParamArray modifier is precied by ByVal modifier the it produces doesn't\r
6 '               produces compiler error\r
7 '============================================================================================\r
8 Imports System\r
9 Module PA_1_2_1\r
10    Sub F(ParamArray ByVal args() As Integer)\r
11         Dim a as Integer\r
12         a = args.Length\r
13         if a=0\r
14                 Throw New System.Exception("#A1, Unexcepted behavoiur of PARAM ARRAY")\r
15         end if\r
16 \r
17    End Sub\r
18    Sub Main()\r
19       Dim a As Integer() = { 1, 2, 3 }\r
20       F(a)\r
21       F(10, 20, 30, 40)\r
22    End Sub\r
23 End Module\r
24 \r
25 '=================================================================================