|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Variable length arrays in .NET 2.0?I have not kept up on the changes to .NET 2.0. Besides ArrayList are there
any other array's or containers that can have an adjustble size? With Generics is there a container that I can Add items to of a known type and have the array or container adjust to hold it? Thank you. Kevin "Kevin Burton" <KevinBur***@discussions.microsoft.com> a écrit dans le message de news: C24DB59A-7690-4BC2-BE00-11AC76CF3***@microsoft.com...|I have not kept up on the changes to .NET 2.0. Besides ArrayList are there Try List<T>, Dictionary<K, V>, etc for starters.| any other array's or containers that can have an adjustble size? With | Generics is there a container that I can Add items to of a known type and | have the array or container adjust to hold it? Joanna -- Joanna Carter [TeamB] Consultant Software Engineer "Kevin Burton" <KevinBur***@discussions.microsoft.com> wrote You're looking for List<>.>I have not kept up on the changes to .NET 2.0. Besides ArrayList are there > any other array's or containers that can have an adjustble size? With > Generics is there a container that I can Add items to of a known type and > have the array or container adjust to hold it? List<string> myList = new List<string>(); myList.Add("Hello"); myList.Add(" "); myList.Add("World"); This can then be converted to an array, or iterated over using standard syntax. |
|||||||||||||||||||||||