In tests/attributes:
[mono.git] / mcs / mbas / Test / tests / typemembers / FunctionArgu_ByReferenceC.vb
1 '=============================================================================================
2 'Name:Manish Kumar Sinha 
3 'Email Address: manishkumarsinha@sify.com
4 'Test Case Name: Argument passing by Reference:
5 'APR-1.1.0: If variable elements is of value type, i.e. it contains only a value then procedure '               can change the variable or any of its members
6 '=============================================================================================
7  
8 Imports System
9 Module APR_1_1_0
10         Function F(ByRef p As String) as String
11                 p = "Sinha"
12                 return p
13         End Function 
14    
15         Sub Main()
16         Dim a As String = "Manish"
17         Dim b As String = ""
18         b=F(a)
19                 if (b<>a)
20                 Throw New System.Exception("#A1, Unexcepted behaviour of ByRef of String Datatype")
21                 end if
22         End Sub 
23 End Module
24
25 '=============================================================================================