Редагувати

Поділитися через


IVector<TValue>.insert Method

Definition

Adds elements to the container at a specified position.

Overloads

insert(ContainerRandomAccessIterator<TValue>, IEnumerable)

Inserts the sequence that is designated by an enumerator into the container.

insert(ContainerRandomAccessIterator<TValue>, ContainerRandomAccessIterator<TValue>, TValue)

Inserts the specified value into the container.

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

Inserts the sequence beginning with _First and ending with the element preceding _Last into the container.

insert(ContainerRandomAccessIterator<TValue>, Int32, TValue)

Inserts the specified value into the container.

Remarks

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

insert(ContainerRandomAccessIterator<TValue>, IEnumerable)

Inserts the sequence that is designated by an enumerator into the container.

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

Parameters

_Where_iter
ContainerRandomAccessIterator<TValue>

The position in the container before which to insert.

_Right
IEnumerable

The enumeration to insert into the container.

Applies to

insert(ContainerRandomAccessIterator<TValue>, ContainerRandomAccessIterator<TValue>, TValue)

Inserts the specified value into the container.

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

Parameters

unnamedParam1
ContainerRandomAccessIterator<TValue>

An iterator that designates the newly inserted element.

_Where
ContainerRandomAccessIterator<TValue>

The position in the container before which to insert.

_Val
TValue

The value of the element to insert into the container.

Applies to

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

Inserts the sequence beginning with _First and ending with the element preceding _Last into the container.

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

Parameters

_Where
ContainerRandomAccessIterator<TValue>

The position in the container before which to insert.

_First
IInputIterator<TValue>

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

_Last
IInputIterator<TValue>

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

Applies to

insert(ContainerRandomAccessIterator<TValue>, Int32, TValue)

Inserts the specified value into the container.

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

Parameters

_Where
ContainerRandomAccessIterator<TValue>

The position in the container before which to insert.

_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 vector::insert (STL/CLR).

Applies to