|
-
Feb 1st, 2011, 10:27 PM
#1
Thread Starter
Addicted Member
[RESOLVED] Array from VB6 to VB.Net
Hi All,
I got one issue to ask you guys.
Here is a code in my VB6 application.
Array(1,"P11","@P 100", "NEXT")
However, now I'm converting this program to VB.Net and I'm stuck at this point.
Can't find Array(xxx,xxx,xxx) in VB.Net 2010.
Is there any option or function for this?
Thanks.
scsfdev
-
Feb 1st, 2011, 10:35 PM
#2
Re: Array from VB6 to VB.Net
This syntax is supported in VB 2010:
vb.net Code:
Dim myArray = {"element1", "element2"}
Another option, which is also supported by older versions, is:
vb.net Code:
Dim myArray As String() = New String() {"element1", "element2"}
-
Feb 1st, 2011, 10:50 PM
#3
Thread Starter
Addicted Member
Re: Array from VB6 to VB.Net
 Originally Posted by jmcilhinney
This syntax is supported in VB 2010:
vb.net Code:
Dim myArray = {"element1", "element2"}
Another option, which is also supported by older versions, is:
vb.net Code:
Dim myArray As String() = New String() {"element1", "element2"}
Hi jmcilhinney,
Thanks for your info.
Tags for this Thread
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
|