(DISTFILES): Comment out a few missing files.
[mono-project.git] / mcs / btests / Function_ParamArrayC4.vb
bloba62be4b234fd3e6250b815735e304f8a1780ffe4
1 REM LineNo: 25
2 REM ExpectedError: BC30192
3 REM ErrorMessage: ParamArray parameter must be last in parameter list.
5 REM LineNo: 29
6 REM ExpectedError: BC30451
7 REM ErrorMessage: Name 'args1' is not declared.
9 REM LineNo: 44
10 REM ExpectedError: BC30311
11 REM ErrorMessage: Value of type '1-dimensional array of Integer' cannot be converted to 'Integer'.
13 REM LineNo: 44
14 REM ExpectedError: BC30311
15 REM ErrorMessage: Value of type '1-dimensional array of Integer' cannot be converted to 'Integer'.
17 '============================================================================================
18 'Name:Manish Kumar Sinha
19 'Email Address: manishkumarsinha@sify.com
20 'Test Case Name: ParamArray:
21 '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
22 '=============================================================================================
23 Imports System
24 Module PA_1_0_0
25 Function F(ParamArray args() As Integer,ParamArray args1() As Integer, ByVal a as Integer, ByVal b as Integer)as Boolean
26 Dim a as integer
27 Dim b as integer
28 a = args.Length
29 b = args1.Length
30 if a<>b
31 return true
32 else
33 return false
34 end if
35 End Function
36 Sub Main()
37 Dim a As Integer() = { 1, 2, 3 }
38 Dim b As Integer() = { 1, 2, 3,4 }
39 Dim c as Integer = 0
40 Dim d as Integer = 0
41 c = a.Length
42 d = b.Length
43 Dim e as Boolean
44 e= F(a,b,c,d)
45 if e<>true
46 Throw New System.Exception("#A1, Unexcepted Behaviour in F(a)")
47 end if
48 End Sub
49 End Module
50 '=============================================================================================