語言

ITree<TKey,TValue>.count(TKey) 方法

定義

找出與指定鍵數相符的元素數量。

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

參數

_Keyval
TKey

尋找的關鍵價值。

傳回

受控序列中與 鍵相同的 _Keyval元素數量。 您可以使用它來判斷目前在受控制序列中符合指定索引鍵的項目數目。

備註

更多資訊請參閱 hash_map::count (STL/CLR)、hash_multimap::count (STL/CLR)、hash_set::count (STL/CLR)及 hash_multiset::count (STL/CLR)。

適用於