ImmutableDictionary.Contains<TKey,TValue> 方法

定義

判斷指定的不可變字典是否包含指定的索引鍵/值組。

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

不可變字典中的值類型。

參數

map
IImmutableDictionary<TKey,TValue>

要搜尋的不可變字典。

key
TKey

要在不可變字典中尋找的索引鍵。

value
TValue

如果找到索引鍵,則為要在指定索引鍵上尋找的值。

傳回

如果這個對應包含指定的索引鍵/值組,則為 true,否則為 false

適用於