What is the difference in declaring an array like this?
I have a problem understanding the proper way to make use of this. What is the difference between these two examples, and could someone please make use of both examples in two simple functions. Intellisense comes up with different alerts for both, so it's a little confusing.
Code:
Dim test1 As String()
Code:
Dim test2() As String
Re: What is the difference in declaring an array like this?
There is no difference. There are certain circumstances where you must put the parentheses after the type and others where you must put them after the variable, then there are circumstances where you can put them after either. What you have shown there is the latter.