IVector<TValue>.insert 方法

定義

將項目新增至容器的指定位置。

多載

insert(ContainerRandomAccessIterator<TValue>, IEnumerable)

將列舉程式所指定的序列插入容器。

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

將指定的值插入容器。

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

將以 _First 為開頭和以 _Last 之前的項目為結尾的序列插入容器。

insert(ContainerRandomAccessIterator<TValue>, Int32, TValue)

將指定的值插入容器。

備註

如需詳細資訊,請參閱 vector::insert (STL/CLR)

insert(ContainerRandomAccessIterator<TValue>, IEnumerable)

將列舉程式所指定的序列插入容器。

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)

參數

_Where_iter
ContainerRandomAccessIterator<TValue>

容器中的位置,插入此位置前。

_Right
IEnumerable

要插入容器中的列舉型別。

適用於

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

將指定的值插入容器。

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

參數

unnamedParam1
ContainerRandomAccessIterator<TValue>

指定新插入之元素的迭代器。

_Where
ContainerRandomAccessIterator<TValue>

容器中的位置,插入此位置前。

_Val
TValue

要插入至容器中的項目值。

適用於

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

將以 _First 為開頭和以 _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);
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))

參數

_Where
ContainerRandomAccessIterator<TValue>

容器中的位置,插入此位置前。

_First
IInputIterator<TValue>

要插入容器之範圍的開頭位置。

_Last
IInputIterator<TValue>

超過要插入容器之範圍的第一個位置。

適用於

insert(ContainerRandomAccessIterator<TValue>, Int32, TValue)

將指定的值插入容器。

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)

參數

_Where
ContainerRandomAccessIterator<TValue>

容器中的位置,插入此位置前。

_Count
Int32

要插入至容器的項目數目。

_Val
TValue

要插入至容器中的項目值。

備註

如需詳細資訊,請參閱 vector::insert (STL/CLR)

適用於