Add new error case
[mono.git] / mcs / btests / FunctionArgu_ByValueB.vb
1 '=============================================================================================\r
2 'Name:Manish Kumar Sinha \r
3 'Email Address: manishkumarsinha@sify.com\r
4 'Test Case Name: Argument passing by Value:\r
5 'APV-1.4.0: By Default VB pass arguments by values, i.e if procedure is pass without mentioning\r
6 '               type then it take as ByVal type\r
7 '=============================================================================================\r
8 Imports System\r
9 Module APV1_4_0\r
10         Function F(p As Integer) as Integer\r
11       p += 1\r
12         return p\r
13    End Function\r
14    \r
15    Sub Main()\r
16       Dim a As Integer = 1\r
17         Dim b as Integer = 0\r
18       b = F(a)\r
19         if b=a\r
20                 Throw new System.Exception("#A1, uncexcepted behaviour of Default VB pass arguments")\r
21         end if\r
22    End Sub \r
23 End Module\r
24 '============================================================================================