**** Merged from MCS ****
[mono-project.git] / mcs / mbas / Test / tests / FunctionArgu_ByValueA.vb
blob05703dfb8bb7c3dbbe2641c26732d46ee4cfca13
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
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 '==========================================================================================