Collection.IList.Add Method (Object)

 

Adds an item to the Collection object. Implements the IList interface.

Namespace:   Microsoft.VisualBasic
Assembly:  Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)

int IList.Add(
	object value
)

Parameters

value
Type: System.Object

The Object to add to the Collection object.

Return Value

Type: System.Int32

The position into which the new element was inserted.

Exception Condition
NotSupportedException

The Collection object is read-only.

-or-

The Collection object has a fixed size.

You can also use the Item property to add new elements by setting the value of a key that does not exist in the Collection object.

Return to top
Show: