IHash<TKey,TValue>.insert 方法

定义

将元素添加到容器中。Adds elements to the container.

重载

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

将给定元素添加到容器中。Adds the given element to the container.

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

将给定值添加到容器。Adds the given value to the container.

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

将给定迭代器指定的元素添加到容器中。Adds to the container the elements specified by the given iterators.

insert(IEnumerable)

将给定的枚举添加到容器。Adds the given enumeration to the container.

注解

有关详细信息,请参阅 哈希 _ 映射:: INSERT (STL/clr) hash _ 多重映射:: insert (stl/clr) 哈希 _ 集:: insert (stl/clr) hash _ 多重集:: insert (stl/clr) For more information, see hash_map::insert (STL/CLR), hash_multimap::insert (STL/CLR), hash_set::insert (STL/CLR), and hash_multiset::insert (STL/CLR).

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

将给定元素添加到容器中。Adds the given element to the container.

public:
 void ^ insert(Microsoft::VisualC::StlClr::Generic::ContainerBidirectionalIterator<TValue> ^ % , Microsoft::VisualC::StlClr::Generic::ContainerBidirectionalIterator<TValue> ^ _Where, TValue _Val);
public void insert (ref Microsoft.VisualC.StlClr.Generic.ContainerBidirectionalIterator<TValue> , 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  As ContainerBidirectionalIterator(Of TValue), _Where As ContainerBidirectionalIterator(Of TValue), _Val As TValue) As Void

参数

_Where
ContainerBidirectionalIterator<TValue>

一个迭代器,指定要将元素插入到容器中的位置。An iterator that specifies where in the container to insert the element. 这仅是一种提示,用于提高性能。This is a hint only and is used to improve performance. 元素可能并不插入在此位置。The element might not be inserted at this location.

_Val
TValue

要插入到容器中的键值。The key value to insert into the container.

注解

有关详细信息,请参阅 哈希 _ 映射:: INSERT (STL/clr) hash _ 多重映射:: insert (stl/clr) 哈希 _ 集:: insert (stl/clr) hash _ 多重集:: insert (stl/clr) For more information, see hash_map::insert (STL/CLR), hash_multimap::insert (STL/CLR), hash_set::insert (STL/CLR), and hash_multiset::insert (STL/CLR).

适用于

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

将给定值添加到容器。Adds the given value to the container.

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

参数

_Val
TValue

要插入到容器中的键值。The key value to insert into the container.

注解

有关详细信息,请参阅 哈希 _ 映射:: INSERT (STL/clr) hash _ 多重映射:: insert (stl/clr) 哈希 _ 集:: insert (stl/clr) hash _ 多重集:: insert (stl/clr) For more information, see hash_map::insert (STL/CLR), hash_multimap::insert (STL/CLR), hash_set::insert (STL/CLR), and hash_multiset::insert (STL/CLR).

适用于

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

将给定迭代器指定的元素添加到容器中。Adds to the container the elements specified by the given iterators.

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

参数

_First
IInputIterator<TValue>

一个迭代器,指向要插入的元素范围的开头。An iterator that points to the beginning of the range of elements to insert.

_Last
IInputIterator<TValue>

一个迭代器,指向紧跟在要插入的元素范围之后的元素。An iterator that points to the element that immediately follows the range of elements to insert.

注解

有关详细信息,请参阅 哈希 _ 映射:: INSERT (STL/clr) hash _ 多重映射:: insert (stl/clr) 哈希 _ 集:: insert (stl/clr) hash _ 多重集:: insert (stl/clr) For more information, see hash_map::insert (STL/CLR), hash_multimap::insert (STL/CLR), hash_set::insert (STL/CLR), and hash_multiset::insert (STL/CLR).

适用于

insert(IEnumerable)

将给定的枚举添加到容器。Adds the given enumeration to the container.

public:
 void insert(System::Collections::IEnumerable ^ _Right);
public void insert (System.Collections.IEnumerable _Right);
abstract member insert : System.Collections.IEnumerable -> unit
Public Sub insert (_Right As IEnumerable)

参数

_Right
IEnumerable

要插入到容器中的枚举。The enumeration to insert into the container.

注解

有关详细信息,请参阅 哈希 _ 映射:: INSERT (STL/clr) hash _ 多重映射:: insert (stl/clr) 哈希 _ 集:: insert (stl/clr) hash _ 多重集:: insert (stl/clr) For more information, see hash_map::insert (STL/CLR), hash_multimap::insert (STL/CLR), hash_set::insert (STL/CLR), and hash_multiset::insert (STL/CLR).

适用于