|
-
Jan 15th, 2004, 02:36 PM
#1
Thread Starter
New Member
A question about arrays
VB.NET
This statement compiles just fine:
Dim NumbersList() As Integer = (12, 32, -3, 114, 543)
But this one will not:
Dim StringsList() As String = ("make", "it", "work", "please")
I get a ')' expected at the first comma, any ideas why?
-
Jan 15th, 2004, 02:50 PM
#2
Post your question in the .Net Forum here.
-
Jan 15th, 2004, 02:58 PM
#3
Hyperactive Member
Re: A question about arrays
Originally posted by ZoomyX
VB.NET
This statement compiles just fine:
Dim NumbersList() As Integer = (12, 32, -3, 114, 543)
But this one will not:
Dim StringsList() As String = ("make", "it", "work", "please")
I get a ')' expected at the first comma, any ideas why?
try this:
Dim StringsList() As String = {"make", "it", "work", "please"}
Changed the ordinary braces to curly braces.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|