Redigera

Dela via


IList<TValue>.insert Method

Definition

Adds elements to the container.

Overloads

insert(ContainerBidirectionalIterator<TValue>, IEnumerable)

Inserts the elements of the specified enumerator into the container.

insert(ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>, TValue)

Inserts an element of the given value into the container.

insert(ContainerBidirectionalIterator<TValue>, IInputIterator<TValue>, IInputIterator<TValue>)

Inserts the sequence [_First, _Last) into the container.

insert(ContainerBidirectionalIterator<TValue>, Int32, TValue)

Inserts an element of the given value into the container.

Remarks

For more information, see list::insert (STL/CLR).

insert(ContainerBidirectionalIterator<TValue>, IEnumerable)

Inserts the elements of the specified enumerator into the container.

public:
 void insert(Microsoft::VisualC::StlClr::Generic::ContainerBidirectionalIterator<TValue> ^ _Where_iter, System::Collections::IEnumerable ^ _Right);
public void insert (Microsoft.VisualC.StlClr.Generic.ContainerBidirectionalIterator<TValue> _Where_iter, System.Collections.IEnumerable _Right);
abstract member insert : Microsoft.VisualC.StlClr.Generic.ContainerBidirectionalIterator<'Value> * System.Collections.IEnumerable -> unit
Public Sub insert (_Where_iter As ContainerBidirectionalIterator(Of TValue), _Right As IEnumerable)

Parameters

_Where_iter
ContainerBidirectionalIterator<TValue>

The position in the container to insert before.

_Right
IEnumerable

The enumeration whose elements are to be inserted into the container.

Applies to

insert(ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>, TValue)

Inserts an element of the given value into the container.

public:
 void ^ insert(Microsoft::VisualC::StlClr::Generic::ContainerBidirectionalIterator<TValue> ^ % unnamedParam1, Microsoft::VisualC::StlClr::Generic::ContainerBidirectionalIterator<TValue> ^ _Where, TValue _Val);
public void insert (ref Microsoft.VisualC.StlClr.Generic.ContainerBidirectionalIterator<TValue> unnamedParam1, Microsoft.VisualC.StlClr.Generic.ContainerBidirectionalIterator<TValue> _Where, TValue _Val);
abstract member insert : ContainerBidirectionalIterator * Microsoft.VisualC.StlClr.Generic.ContainerBidirectionalIterator<'Value> * 'Value -> unit
Public Function insert (ByRef unnamedParam1 As ContainerBidirectionalIterator(Of TValue), _Where As ContainerBidirectionalIterator(Of TValue), _Val As TValue) As Void

Parameters

unnamedParam1
ContainerBidirectionalIterator<TValue>

An iterator that designates the newly inserted element.

_Where
ContainerBidirectionalIterator<TValue>

The position in the container immediately following the newly inserted elements.

_Val
TValue

The value of the element to insert into the container.

Applies to

insert(ContainerBidirectionalIterator<TValue>, IInputIterator<TValue>, IInputIterator<TValue>)

Inserts the sequence [_First, _Last) into the container.

public:
 void insert(Microsoft::VisualC::StlClr::Generic::ContainerBidirectionalIterator<TValue> ^ _Where, Microsoft::VisualC::StlClr::Generic::IInputIterator<TValue> ^ _First, Microsoft::VisualC::StlClr::Generic::IInputIterator<TValue> ^ _Last);
public void insert (Microsoft.VisualC.StlClr.Generic.ContainerBidirectionalIterator<TValue> _Where, Microsoft.VisualC.StlClr.Generic.IInputIterator<TValue> _First, Microsoft.VisualC.StlClr.Generic.IInputIterator<TValue> _Last);
abstract member insert : Microsoft.VisualC.StlClr.Generic.ContainerBidirectionalIterator<'Value> * Microsoft.VisualC.StlClr.Generic.IInputIterator<'Value> * Microsoft.VisualC.StlClr.Generic.IInputIterator<'Value> -> unit
Public Sub insert (_Where As ContainerBidirectionalIterator(Of TValue), _First As IInputIterator(Of TValue), _Last As IInputIterator(Of TValue))

Parameters

_Where
ContainerBidirectionalIterator<TValue>

The position in the container immediately following the newly inserted elements.

_First
IInputIterator<TValue>

The beginning position of the range of elements to insert into the container.

_Last
IInputIterator<TValue>

The first position beyond the range of elements to insert into the container.

Applies to

insert(ContainerBidirectionalIterator<TValue>, Int32, TValue)

Inserts an element of the given value into the container.

public:
 void insert(Microsoft::VisualC::StlClr::Generic::ContainerBidirectionalIterator<TValue> ^ _Where, int _Count, TValue _Val);
public void insert (Microsoft.VisualC.StlClr.Generic.ContainerBidirectionalIterator<TValue> _Where, int _Count, TValue _Val);
abstract member insert : Microsoft.VisualC.StlClr.Generic.ContainerBidirectionalIterator<'Value> * int * 'Value -> unit
Public Sub insert (_Where As ContainerBidirectionalIterator(Of TValue), _Count As Integer, _Val As TValue)

Parameters

_Where
ContainerBidirectionalIterator<TValue>

The position in the container immediately following the newly inserted elements.

_Count
Int32

The number of elements to insert into the container.

_Val
TValue

The value of the element to insert into the container.

Remarks

For more information, see list::insert (STL/CLR).

Applies to