ImmutableDictionary<TKey,TValue>.Contains 方法

定义

确定此不可变字典是否包含指定的键/值对。

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

参数

pair
KeyValuePair<TKey,TValue>

要查找的键/值对。

返回

如果在字典中找到指定的键/值对,则为 true;否则为 false

实现

适用于