U
Urs van Binsbergen
Hi!
This sounds probably quite silly, but I just can't figure out this one.
Consider the following which lets "a" be an array with 0 elements:
Dim a() As Integer
a = New Integer() {}
Now what do I have to code if I want an empty array as default value in
a function? This one doesn't work:
Function test(Optional ByVal a As Integer() = New Integer() {})
End Function
It says: Constant expression required. Is this not possible in general
because default values can only be simple types?
Greets and thanks,
Urs
This sounds probably quite silly, but I just can't figure out this one.
Consider the following which lets "a" be an array with 0 elements:
Dim a() As Integer
a = New Integer() {}
Now what do I have to code if I want an empty array as default value in
a function? This one doesn't work:
Function test(Optional ByVal a As Integer() = New Integer() {})
End Function
It says: Constant expression required. Is this not possible in general
because default values can only be simple types?
Greets and thanks,
Urs