
pass an array as function/sub argument
John,
I would do it like this:
Private Sub DoSomething(ByVal x As Integer())
End Sub
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles MyBase.Load
Dim x(5) As Integer
DoSomething(x)
End Sub
Sam Matzen
Quote:
> how to pass an array as an argument to the function/sub procedure??
> Sub Main()
> Dim X(5) As Integer
> 'do something on X
> '2 attempts: but compile errors
> printArray(X)
> printArray((X))
> End Sub
> Private Sub printArray(param1() As Integer)
> 'do something on array param1
> End Sub