Optional Parameter
sub Test(OptionalByVal myParameters(,)AsString =Nothing)
How do I check that the myParameters has had an array passed to it?
I'm looking for something like the following
if myParameters=nothing
sub Test(OptionalByVal myParameters(,)AsString =Nothing)
How do I check that the myParameters has had an array passed to it?
I'm looking for something like the following
if myParameters=nothing
Instead of the optional parameter (old crappy vb 6 way), overload the Sub and then you'll know, ie:
Sub Test(Parameters(,) as string)
'Do Something
End Sub
Sub Test()
'Do Something
End Sub
Private Sub Test(Optional ByVal myParameters(,) As String = Nothing)
If myParameters IsNot Nothing Then
Debug.Print("Array size = {0} x {1}", myParameters.GetLength(0), myParameters.GetLength(1))
End If
End Sub