"Mattias Sjögren" <ma********************@mvps.org> wrote in message
news:OE**************@TK2MSFTNGP11.phx.gbl...
As there is no ReDim in C# , what is the preferred technique for
dynmically
increasing the size of any array ?
To use a List<T> or ArrayList instead, unless it has to be an actual
array. Otherwise you have to implement the array "resizing" yourself
by allocating a new array and copying the exisitng elements.
Unfortunately a large number of framework methods take arrays as parameters.
Even more irritatingly, many of them don't have overloads to specify array
ranges which often forces you to make at least one "unnecessary" copy - in
which case you might as well use List<T>.ToArray() anyway.