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'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top