Dictionary<TKey,TValue>.ICollection<KeyValuePair<TKey,TValue>>.Contains 方法

定义

确定是否 ICollection<T> 包含一个指定键和值。

 virtual bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey,TValue>>.Contains(System::Collections::Generic::KeyValuePair<TKey, TValue> keyValuePair) = System::Collections::Generic::ICollection<System::Collections::Generic::KeyValuePair<TKey, TValue>>::Contains;
bool ICollection<KeyValuePair<TKey,TValue>>.Contains (System.Collections.Generic.KeyValuePair<TKey,TValue> keyValuePair);
abstract member System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey,TValue>>.Contains : System.Collections.Generic.KeyValuePair<'Key, 'Value> -> bool
override this.System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey,TValue>>.Contains : System.Collections.Generic.KeyValuePair<'Key, 'Value> -> bool
Function Contains (keyValuePair As KeyValuePair(Of TKey, TValue)) As Boolean Implements ICollection(Of KeyValuePair(Of TKey, TValue)).Contains

参数

keyValuePair
KeyValuePair<TKey,TValue>

要在 KeyValuePair<TKey,TValue> 中定位的 ICollection<T> 结构。

返回

如果在 true 中找到 keyValuePair,则为 ICollection<T>;否则为 false

实现

适用于