By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,906 Members | 1,715 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,906 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Nov 15 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.
Nov 15 '05 #2

P: n/a
Hi Andreas,

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

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Andreas Müller" <an***************@gmx.de> wrote in message
news:uR**************@TK2MSFTNGP12.phx.gbl...
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

Nov 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.