語言

IVector<TValue>.insert 方法

定義

在特定位置向容器添加元素。

多載

名稱 Description
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)。

適用於