Dynamic Array size

  • Thread starter Thread starter Vijay Balki
  • Start date Start date
V

Vijay Balki

I have a array who's size I will know only at runtime. How do I initialize
the size of the array at runtime? Is there a equivalent of ReDim in .NET??

VJ
 
Hello,

Vijay Balki said:
I have a array who's size I will know only at runtime. How do I initialize
the size of the array at runtime? Is there a equivalent of ReDim in .NET??

You can still use 'ReDim' ('ReDim Preserve') with VB.NET to change the size
of an array. If you have to change the number of elements very often, it's
better to use a dynamic data structure like an 'ArrayList'.
 
Back
Top