Steve36445
Well-known member
- Joined
- Dec 23, 2007
- Messages
- 58
- Programming Experience
- 10+
Can you help me please?
I want to declare an array of unknown length and then add items to it I would think something like this but it doesn,t
work
I believe the answer may involve the 'new' keyword but I cannot find the syntax.
Thanks,
Steve
I want to declare an array of unknown length and then add items to it I would think something like this but it doesn,t
work
VB.NET:
dim my_array() as string 'length unknown
dim could_be_any_length as integer' not known at time of declaration
could_be_any_length = 34' not known at time of declaration
For index As Integer = 0 To could_be_any_length
my_array(index)=index.tostring
next
I believe the answer may involve the 'new' keyword but I cannot find the syntax.
Thanks,
Steve