Results 1 to 2 of 2

Thread: What is the difference in declaring an array like this?

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2011
    Posts
    8

    Question 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

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width