IHash<TKey,TValue>.count(TKey) Method

Definition

Finds the number of elements that match a specified key.

C#
public int count(TKey _Keyval);

Parameters

_Keyval
TKey

The key value for which to search.

Returns

The number of elements in the controlled sequence that have the same key as _Keyval. You use it to determine the number of elements currently in the controlled sequence that match a specified key.

Remarks

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

Applies to

Product Versions
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1