"Brian Patterson" <br********************@mchsi.com> schrieb:
Also keep in mind that when you redim the array - you will lose the
contents unless you use the preserve keyword to maintain the contents.
You may want to look into using the ArrayList class rather than using a
standard array since this grows as needed plus you can sort and so on.
I didn't specifically mention 'Preserve' because the behavior didn't change
between VB6 and VB.NET. You can easily sort normal arrays too using
'Array.Sort' too. Arrays give you easy-to-use type-safety, arraylists
don't. If the number of items stored in the array rarely changes, using an
array is the preferred way. Alternatively, implementing a type-safe
collection or waiting for generic collection classes of Whidbey may be an
option if type-safety is a requirement and you want to get rid of tons of
'DirectCast' statements in your code.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>