pls copy paste program below and try it out... '************ Imports System
Module Program Sub inputproc(ByRef pstudarr() As String) Dim count As Integer For count = 0 To 3 Console.WriteLine("Input name " & count) pstudarr(count) = Console.ReadLine Next End Sub
Sub display(ByRef pstudarr() As String)
Dim count As Integer
For count = 0 To 3
Console.WriteLine(pstudarr(count))
pstudarr(count) = "zzzzzzz"
Next
End Sub
Sub Main(args As String())
Dim studarr(3) As String
Call inputproc(studarr)
Call display(studarr)
Console.ReadLine()
Call display(studarr)
End Sub
End Module '*************
next replace Sub display(ByRef pstudarr() As String)
with Sub display(Byval pstudarr() As String)
You will see... it is same output
SO IT SEEMS NO DIFFERENCE WITH BYVAL AND BYREF IN ARRAYS???
same output... seems byval and byref has no difference for arrays.
Anyone having same issues???