|
-
Nov 28th, 2002, 01:35 AM
#1
Thread Starter
New Member
Arrays in VB.NET
What I want to do is create an array, of say 5 elements, but instead of doing it the old VB6 way:
Dim myArr(4) as variant
myArr(0) = "1"
myArr(1) = 23
myArr(2) = "2"
myArr(3) = "other"
myArr(4) = 2.2
I want to be able to clean it up and do it on one line, somthing like this:
Dim myArr(4) as VariantType = new Array("1",2,2.2,"4",5)
But I get the error:
'New' cannot be used on a class that is declared 'MustInherit'.
I know I am doing something wrong, anyone know what???
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
|