ImmutableDictionary.Contains<TKey,TValue> 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
判斷指定的不可變字典是否包含指定的索引鍵/值組。
public:
generic <typename TKey, typename TValue>
[System::Runtime::CompilerServices::Extension]
static bool Contains(System::Collections::Immutable::IImmutableDictionary<TKey, TValue> ^ map, TKey key, TValue value);
public static bool Contains<TKey,TValue>(this System.Collections.Immutable.IImmutableDictionary<TKey,TValue> map, TKey key, TValue value);
static member Contains : System.Collections.Immutable.IImmutableDictionary<'Key, 'Value> * 'Key * 'Value -> bool
<Extension()>
Public Function Contains(Of TKey, TValue) (map As IImmutableDictionary(Of TKey, TValue), key As TKey, value As TValue) As Boolean
類型參數
- TKey
不可變字典中金鑰的類型。
- TValue
不變字典中值的類型。
參數
不可變的字典可供搜尋。
- key
- TKey
關鍵在於在不可變的字典中尋找。
- value
- TValue
如果找到指定鍵,則在指定鍵上尋找的值。
傳回
true如果此映射包含指定的鍵值對;否則,。 false