The List(Of T) Collection
The 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:
Dim person1 As New Person With {.FirstName = "Alessandro", .LastName = "Del Sole", .Age = 37}Dim person2 As New Person With {.FirstName = "XXXXX", .LastName = "ZZZZZZZZ", .Age ...
Get Visual Basic 2015 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.