Skip to Main Content
Visual Basic 2015 Unleashed
book

Visual Basic 2015 Unleashed

by Alessandro Del Sole
July 2015
Intermediate to advanced content levelIntermediate to advanced
1300 pages
87h 27m
English
Sams
Content preview from Visual Basic 2015 Unleashed

The ArrayList Collection

System.Collections.ArrayList is the most common nongeneric collection in the .NET Framework and represents an ordered set of items. By ordered, we mean that you add items to the collection one after the other, which is different from sorting. ArrayList collections can store any .NET type because, at a higher level, it accepts items of type Object. The following code shows how you can create a new ArrayList and can set the number of items it can contain by setting the Capacity property:

Dim mixedCollection As New ArrayListmixedCollection.Capacity = 10

Adding new items to an ArrayList is a simple task. To do this, you invoke the Add method that receives as an argument the object you want to ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning Visual Basic 2015

Beginning Visual Basic 2015

Bryan Newsome

Publisher Resources

ISBN: 9780134196664Purchase book