Name

Collection.Add Method — Microsoft.VisualBasic.Collection

Synopsis

objectvariable.Add item [, key, before, after]
objectvariable required; Collection Object

The Collection object to which an item is to be added

item required; Object

An object of any type that specifies the member to add to the collection

key optional; String

A unique string expression that specifies a key string that can be used, instead of a positional index, to access a member of the collection

before optional; Object

Index or key of the item after which the new item is to be added

after optional; Object

Index or key of the item before which the new item is to be added

Description

Adds an item to a particular position in a collection, or to the end of the collection if no positioned specified.

Get VB.NET Language Pocket Reference 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.