Uredi

Deli z drugimi prek


ITree<TKey,TValue>.erase Method

Definition

Removes elements from the container.

Overloads

erase(TKey)

Removes elements from the container that match the specified key.

erase(ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>)

Removes from the container the element that is specified by the given iterator.

erase(ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>)

Removes from the container the elements between the specified iterators.

Remarks

For more information, see hash_map::erase (STL/CLR), hash_multimap::erase (STL/CLR), hash_set::erase (STL/CLR), and hash_multiset::erase (STL/CLR).

erase(TKey)

Removes elements from the container that match the specified key.

public:
 int erase(TKey _Keyval);
public int erase (TKey _Keyval);
abstract member erase : 'Key -> int
Public Function erase (_Keyval As TKey) As Integer

Parameters

_Keyval
TKey

The key value to erase.

Returns

The number of elements removed.

Remarks

For more information, see hash_map::erase (STL/CLR), hash_multimap::erase (STL/CLR), hash_set::erase (STL/CLR), and hash_multiset::erase (STL/CLR).

Applies to

erase(ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>)

Removes from the container the element that is specified by the given iterator.

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

Parameters

unnamedParam1
ContainerBidirectionalIterator<TValue>

An iterator that designates the first element beyond the removed element, or end(ContainerBidirectionalIterator<TValue>) if no such element exists.

_Where
ContainerBidirectionalIterator<TValue>

An iterator that points to the element to erase.

Remarks

For more information, see hash_map::erase (STL/CLR), hash_multimap::erase (STL/CLR), hash_set::erase (STL/CLR), and hash_multiset::erase (STL/CLR).

Applies to

erase(ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>)

Removes from the container the elements between the specified iterators.

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

Parameters

unnamedParam1
ContainerBidirectionalIterator<TValue>

An iterator that designates the first element beyond the elements removed, or end(ContainerBidirectionalIterator<TValue>) if no such element exists.

_First_iter
ContainerBidirectionalIterator<TValue>

An iterator that points to the beginning of the range to erase.

_Last_iter
ContainerBidirectionalIterator<TValue>

An iterator that points to the position that immediately follows the range to erase.

Remarks

For more information, see hash_map::erase (STL/CLR), hash_multimap::erase (STL/CLR), hash_set::erase (STL/CLR), and hash_multiset::erase (STL/CLR).

Applies to