NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ArrayList.Insert

Inserts an element into the ArrayList at the specified index.

[Visual Basic]
Overridable Public Sub Insert( _
   ByVal index As Integer, _
   ByVal value As Object _
)
[C#]
public virtual void Insert(
   int index,
   object value
);
[C++]
public: virtual void Insert(
   int index,
   Object* value
);
[JScript]
public function Insert(
   index : int,
   value : Object
);

Parameters

index
The index at which to insert value.
value
The Object to insert.

Return Value

None.

Exceptions

Exception Type Condition
ArgumentOutOfRangeException index is less than zero.

-or-

index is equal to or greater than Count.

NotSupportedException The ArrayList is read-only.

-or-

The ArrayList has a fixed size.

Remarks

This method can be overridden by a derived class.

If Count already equals Capacity, the capacity of the list is doubled by automatically reallocating the internal array, before the new element is inserted.

If index is equal to Count, value is added to the end of ArrayList.

See Also

ArrayList Class | ArrayList Members | System.Collections Namespace | Add | InsertRange