Huh? That is at runtime
Printable View
Huh? That is at runtime
Is it possible to create dynamic arrays, if so then how?
ThankS In AdvancE!!!
Well you can always ReDim arrays, but realistically this is why Collections are so powerful. What are you trying to do?
I'm not familiar with c++ so I couldn't tell you if dynamic allocation in c++ is available in vb.net
Just use a collection, same result
vb Code:
Dim AutomaticallyExpandingList As New List(Of String) AutomaticallyExpandingList.Add("hello") AutomaticallyExpandingList.Add("world")
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?
i've cleared that now from Athiest
thanks for your reply chris.
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