
Originally Posted by
Aash
thanks chris

what if i want to create an array at run-time?

Originally Posted by
Aash
yes, i want to create an array at run-time like we use dynamic allocation of arrays in c++. In your code you are adding two strings at compile time, right?

as i've said that i want to add items at run-time, is it possible in vb.net?
Edit: how did ur post come at first? what's happening?
This is at run time and no they are not concatinated together either, it's a collection of type String which means:
Code:
Dim AutomaticallyExpandingList As New List(Of String)
AutomaticallyExpandingList.Add("hello") 'index 0
AutomaticallyExpandingList.Add("world") 'index 1
Messagebox.Show(AutomaticallyExpandingList(0)) 'Shows: hello
Messagebox.Show(AutomaticallyExpandingList(1)) 'Shows: world
Messagebox.Show(AutomaticallyExpandingList(0) & " " & AutomaticallyExpandingList(1)) 'Shows: hello world