Is there a build in way to redim an Array in C# like VB.NETs "Redim" statement?

  • Thread starter Andreas =?ISO-8859-1?Q?M=FCller?=
  • Start date
A

Andreas =?ISO-8859-1?Q?M=FCller?=

Hi all,

VB.NET has the "Redim [Preserve]" statement, which allows me to
redimension a System.Array to a new size.
I was wondering if something like that is build into the C# language,
too?

Thanks in advance,
Andy
 
M

Mattias Sjögren

Andreas,
VB.NET has the "Redim [Preserve]" statement, which allows me to
redimension a System.Array to a new size.
I was wondering if something like that is build into the C# language,
too?

No, nothing in the language. But VB.NET just creates a new array and
optionally copies over existing items.



Mattias
 
I

Ignacio Machin

Hi Andreas,

I don't think so , if you need a dynamic array use ArrayList instead.

Cheers,
 

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

Top