(DISTFILES): Comment out a few missing files.
[mono-project.git] / mcs / mbas / Test / tests / Function_ParamArrayA.vb
blob591be488a35d3daec0e7f34150c64e24647cfc79
1 '============================================================================================
2 'Name:Manish Kumar Sinha
3 'Email Address: manishkumarsinha@sify.com
4 'Test Case Name: Param Array:
5 'APR-1.2.1: If ParamArray modifier is precied by ByVal modifier the it produces doesn't
6 ' produces compiler error
7 '============================================================================================
8 Imports System
9 Module PA_1_2_1
10 Function F(ParamArray ByVal args() As Integer)As Integer
11 Dim a as integer
12 a = args.Length
13 return a
14 End Function
15 Sub Main()
16 Dim a As Integer() = { 1, 2, 3 }
17 Dim b as Integer
18 b= F(a)
19 if b<>3
20 Throw New System.Exception("#A1, Unexcepted Behaviour in F(a)")
21 end if
23 b = F(10, 20, 30, 40)
24 if b<>4
25 Throw New System.Exception("#A2, Unexcepted Behaviour in F(10,20,30,40)")
26 end if
27 b = F()
28 if b<>0
29 Throw New System.Exception("#A3, Unexcepted Behaviour in F()")
30 end if
31 End Sub
32 End Module
34 '============================================================================================