Share via


Collection.IListAdd Method

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

Namespace: Microsoft.VisualBasic

Assembly: Microsoft.VisualBasic (in microsoft.visualbasic.dll)

Private Function IListAdd( _
   ByVal value As Object _
) As Integer Implements IList.Add
private int IListAdd(
   object value
);

Parameters

  • value
    The Object to add to the Collection object.

Return Value

The position into which the new element was inserted.

Exceptions

Exception Description

NotSupportedException

The Collection object is read-only.

-or-

The Collection object has a fixed size.

Remarks

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.

Version Information

.NET Framework

Supported in: 2.0, 1.1, 1.0

See Also

Reference

Collection
IList
Add
Item