List(Of T) Collection
System.Collections.Generic.List(Of T) collection is a generic ordered list of items. It is a strongly typed collection, meaning that it can accept only members of the specified type. It is useful because it provides support for adding, editing, and removing items within the collection. For example, imagine you need to store a series of
Person objects to a collection. This can be accomplished as follows:
You notice that the
List(Of T) has lots of members in common with its nongeneric counterpart that is the
ArrayList. This is because the first one implements the
IList(Of T) interface, whereas the second one implements ...