Muokkaa

Jaa


IHash<TKey,TValue>.insert Method

Definition

Adds elements to the container.

Overloads

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.

Remarks

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> ^ % 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>

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.

Remarks

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).

Applies to

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

Parameters

unnamedParam1
GenericPair<ContainerBidirectionalIterator<TValue>,Boolean>

A pair of values X. If X.second is true, X.first designates the newly inserted element; otherwise X.first designates an element with equivalent ordering that already exists, and no new element is inserted.

_Val
TValue

The key value to insert into the container.

Remarks

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).

Applies to

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))

Parameters

_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.

Remarks

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).

Applies to

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)

Parameters

_Right
IEnumerable

The enumeration to insert into the container.

Remarks

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).

Applies to