(DISTFILES): Comment out a few missing files.
[mono-project.git] / mcs / btests / OptionalArgu_ByValueA2.vb
blobbae456e121449c09a7dbe3aedbceb52c0e0a6066
1 REM LineNo: 20
2 REM ExpectedError: BC30202
3 REM ErrorMessage: 'Optional' expected.
5 REM LineNo: 21
6 REM ExpectedError: BC30815
7 REM ErrorMessage: 'name' is not declared. File I/O functionality is available in the 'Microsoft.VisualBasic' namespace.
9 '=============================================================================================
10 'Name:Manish Kumar Sinha
11 'Email Address: manishkumarsinha@sify.com
12 'Test Case Name: Argument passing by Optional Keyword:
13 'O.P-1.0.0: An Optional parameter must specify a constant expression to be used a replacement
14 ' value if no argument is specified. After Optional parameter we can't use general
15 ' parameter as ByVal or ByRef
16 '=============================================================================================
18 Imports System
19 Module OP1_0_0
20 Sub F(ByVal telephoneNo as Long, Optional ByVal code as Integer = 080,Optional ByVal code1 As Integer = 091, ByRef name As String)
21 if (code <> 080 and code1 <> 091 and name="")
22 Throw New System.Exception("#A1, Unexcepted behaviour in string of OP1_0_0")
23 end if
24 End Sub
26 Sub Main()
27 Dim telephoneNo As Long = 9886066432
28 Dim name As String ="Manish"
29 F(telephoneNo,,name)
30 End Sub
32 End Module