dynamic arrays

  • Thread starter Thread starter soosan
  • Start date Start date
S

soosan

hi i dont know the size of my array. how do i create dynamic arrays in c#?
like vb allows redim and preserve i havent come across anything like that in
c#

thanx
 
soosan said:
hi i dont know the size of my array. how do i create dynamic arrays in c#?
like vb allows redim and preserve i havent come across anything like that in
c#

Well, VB is just making it more convenient to create a new array and
copy over the contents of the old one. It's not really a dynamically
sized array.

For the most part, however, the solution is to use ArrayList.
 
Hi Soosan,

In addition to Jon,

If an array is dynamic in VB.net than it is also much easier to use an
arraylist

Cor
 

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