Imports System
Public Class MainClass
Shared Sub Main()
Dim A() As String = {"HELLO", "GOODBYE"}
Console.WriteLine("Original first item in array is: " _
& A(0))
Console.WriteLine("Original second item in array is: " _
& A(1))
AFunction(A)
Console.WriteLine("After passing by value first item in array now is: " _
& A(0))
Console.WriteLine("After passing by value second item in array is: " _
& A(1))
End Sub
Shared Sub AFunction(ByVal Foo As String())
Foo(0) = "GOODBYE"
Foo(1) = "HELLO"
End Sub
End Class
|