G
Guest
Hi,
The following syntax works when used within a subroutine but not when
declaring an optional parameter in a sub definition:
Within sub:
Dim arr(,) as integer = {{0}, {0}}
Declaration:
Private Sub TempName(byval field1 as string, optional byval arr(,) as
integer = {{0}, {0}} )
The Sub Declaration put a squiggly mark under the first { and states
"expression expected". I've tried different variations and searched books and
the web to no avail. Is this a bug or am I using incorrect syntax?
Thanks!
NJ
The following syntax works when used within a subroutine but not when
declaring an optional parameter in a sub definition:
Within sub:
Dim arr(,) as integer = {{0}, {0}}
Declaration:
Private Sub TempName(byval field1 as string, optional byval arr(,) as
integer = {{0}, {0}} )
The Sub Declaration put a squiggly mark under the first { and states
"expression expected". I've tried different variations and searched books and
the web to no avail. Is this a bug or am I using incorrect syntax?
Thanks!
NJ