when i try to evaluate TheArray.. i get the error
ArgumentNullExc eption was unhandled.... Vaule cannot be null
How can i evaluate this to determine if the user has passed an arrary to it
or left it blank
"Armin Zingler" <az.nospam@free net.dewrote in message
news:enOQ0QtqIH A.5096@TK2MSFTN GP02.phx.gbl...
"Brian S." <bsgallatin@com munity.nospamsc hrieb
>Hi,
>I am wondering how i can pass an array as an optional parameter to a
>function?
>
Use the Optional keyword in the function signatur:
>
Function Bla(Optional ByVal TheArray As String() = Nothing) _
As Boolean
>
>
End Function
>
>
Instead of using optional parameters, you can also write overloaded
functions.
>
>
Armin
> Function Bla(Optional ByVal TheArray As String() = Nothing) _
> As Boolean
>
when i try to evaluate TheArray.. i get the error
ArgumentNullExc eption was unhandled.... Vaule cannot be null
How can i evaluate this to determine if the user has passed an
arrary to it or left it blank
"= Nothing" specifies the default value if the caller did not
(explicitly) pass the parameter, so you just have to check this:
If TheArray is Nothing Then
'no parameter passed
end if
Comment