* roottypes.cs: Rename from tree.cs.
[mono.git] / mcs / mbas / Test / tests / typemembers / FunctionArgu_ByValueA.vb
1 '==========================================================================================
2 'Name:Manish Kumar Sinha 
3 'Email Address: manishkumarsinha@sify.com
4 'Test Case Name: Argument passing by Value:
5 'APV-1.0.0: Argument Passing by value, which means the procedure cannot modify the variable
6 '               itself.
7 '==========================================================================================
8 Imports System
9 Module APV1_0
10         Function  F(ByVal p As Integer) As Integer
11                 p += 1
12                 return p
13         End Function 
14    
15    Sub Main()
16       Dim a As Integer = 1
17       Dim b As Integer = 0 
18         b = F(a)
19         if b=a
20                 Throw new System.Exception("#A1, Unexcepted behaviour")
21         end if
22    End Sub 
23 End Module
24 '==========================================================================================