Foley .NET Utilities Class Library

IList2.Insert Method (Int32, Object)

When implemented by a class, inserts an object to the list at the specified position.

[Visual Basic]
Function Insert( _
   ByVal index As Integer, _
   ByVal value As Object _
) As Boolean
[C#]
bool Insert(
   int index,
   object value
);

Parameters

index
The zero-based index at which value should be inserted.
value
The object to insert into the list.

Return Value

true if the list is modified; otherwise false.

Remarks

This method hides the IList method that returns void. You may want to do an explicit interface method implementation for the IList version to be completely compatible.

Exceptions

Exception TypeCondition
System.NotSupportedException

The list is read-only.

-or-

The list has a fixed size.

See Also

IList2 Interface | IList2 Members | Foley.Utilities.Collections Namespace | IList2.Insert Overload List