I'm new to C# coming from VB.
Visual Basic has a keyword named Redim [Preserve] that allows the programmer to resize an array (making it bigger) while preserving its current values. How can this be done in C#?
> I'm already using the ArrayList class. I wonder how efficient it is, though!
ArrayList 'redims' less frequently than you would in VB, if you did a redim on every add. If that was your pattern in VB, ArrayList is much more efficient.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.