List<T>.IList.Add(Object) List<T>.IList.Add(Object) List<T>.IList.Add(Object) Method

Definition

Adds an item to the IList.

 virtual int System.Collections.IList.Add(System::Object ^ item) = System::Collections::IList::Add;
int IList.Add (object item);
Function Add (item As Object) As Integer Implements IList.Add

Parameters

item
Object Object Object

The Object to add to the IList.

Returns

The position into which the new element was inserted.

Implements

Exceptions

item is of a type that is not assignable to the IList.

Remarks

If Count is less than Capacity, this method is an O(1) operation. If the capacity needs to be increased to accommodate the new element, this method becomes an O(n) operation, where n is Count.

Applies to