IHash<TKey,TValue>.erase 方法

定義

移除容器中的項目。

多載

erase(TKey)

從容器移除符合指定之索引鍵的項目。

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

從容器移除由指定之 Iterator 所指定的項目。

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

從容器移除指定之 Iterator 之間的項目。

備註

如需詳細資訊,請參閱 hash_map::erase (STL/CLR) hash_multimap::erase (STL/CLR) hash_set::erase (STL/CLR) hash_multiset::erase (STL/CLR)

erase(TKey)

從容器移除符合指定之索引鍵的項目。

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

參數

_Keyval
TKey

要清除的索引鍵值。

傳回

移除的項目數目。

備註

如需詳細資訊,請參閱 hash_map::erase (STL/CLR) hash_multimap::erase (STL/CLR) hash_set::erase (STL/CLR) hash_multiset::erase (STL/CLR)

適用於

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

從容器移除由指定之 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

參數

unnamedParam1
ContainerBidirectionalIterator<TValue>

指定超過所移除項目之第一個項目的 Iterator,如果沒有此類項目存在則為 end(ContainerBidirectionalIterator<TValue>)

_Where
ContainerBidirectionalIterator<TValue>

指向要清除之項目的 Iterator。

備註

如需詳細資訊,請參閱 hash_map::erase (STL/CLR) hash_multimap::erase (STL/CLR) hash_set::erase (STL/CLR) hash_multiset::erase (STL/CLR)

適用於

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

從容器移除指定之 Iterator 之間的項目。

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

參數

unnamedParam1
ContainerBidirectionalIterator<TValue>

指定超過所移除項目之第一個項目的 Iterator,如果沒有此類項目存在則為 end(ContainerBidirectionalIterator<TValue>)

_First_iter
ContainerBidirectionalIterator<TValue>

指向要清除之範圍開頭的 Iterator。

_Last_iter
ContainerBidirectionalIterator<TValue>

指向緊接在要清除之範圍後的位置之 Iterator。

備註

如需詳細資訊,請參閱 hash_map::erase (STL/CLR) hash_multimap::erase (STL/CLR) hash_set::erase (STL/CLR) hash_multiset::erase (STL/CLR)

適用於