ImmutableDictionary.GetValueOrDefault メソッド

定義

オーバーロード

名前 説明
GetValueOrDefault<TKey,TValue>(IImmutableDictionary<TKey,TValue>, TKey)

ディクショナリに一致するキーが存在する場合は、特定のキーの値を取得します。

GetValueOrDefault<TKey,TValue>(IImmutableDictionary<TKey,TValue>, TKey, TValue)

ディクショナリに一致するキーが存在する場合は、特定のキーの値を取得します。

GetValueOrDefault<TKey,TValue>(IImmutableDictionary<TKey,TValue>, TKey)

ソース:
ImmutableDictionary.cs
ソース:
ImmutableDictionary.cs
ソース:
ImmutableDictionary.cs
ソース:
ImmutableDictionary.cs
ソース:
ImmutableDictionary.cs
ソース:
ImmutableDictionary.cs

ディクショナリに一致するキーが存在する場合は、特定のキーの値を取得します。

public:
generic <typename TKey, typename TValue>
[System::Runtime::CompilerServices::Extension]
 static TValue GetValueOrDefault(System::Collections::Immutable::IImmutableDictionary<TKey, TValue> ^ dictionary, TKey key);
public static TValue GetValueOrDefault<TKey,TValue>(this System.Collections.Immutable.IImmutableDictionary<TKey,TValue> dictionary, TKey key);
public static TValue? GetValueOrDefault<TKey,TValue>(this System.Collections.Immutable.IImmutableDictionary<TKey,TValue> dictionary, TKey key);
static member GetValueOrDefault : System.Collections.Immutable.IImmutableDictionary<'Key, 'Value> * 'Key -> 'Value
<Extension()>
Public Function GetValueOrDefault(Of TKey, TValue) (dictionary As IImmutableDictionary(Of TKey, TValue), key As TKey) As TValue

型パラメーター

TKey

キーの型。

TValue

値の型。

パラメーター

dictionary
IImmutableDictionary<TKey,TValue>

値を取得するディクショナリ。

key
TKey

検索用のキー。

返品

TValue

キーの値。一致するキーが見つからなかった場合は default(TValue)

適用対象

GetValueOrDefault<TKey,TValue>(IImmutableDictionary<TKey,TValue>, TKey, TValue)

ソース:
ImmutableDictionary.cs
ソース:
ImmutableDictionary.cs
ソース:
ImmutableDictionary.cs
ソース:
ImmutableDictionary.cs
ソース:
ImmutableDictionary.cs
ソース:
ImmutableDictionary.cs

ディクショナリに一致するキーが存在する場合は、特定のキーの値を取得します。

public:
generic <typename TKey, typename TValue>
[System::Runtime::CompilerServices::Extension]
 static TValue GetValueOrDefault(System::Collections::Immutable::IImmutableDictionary<TKey, TValue> ^ dictionary, TKey key, TValue defaultValue);
public static TValue GetValueOrDefault<TKey,TValue>(this System.Collections.Immutable.IImmutableDictionary<TKey,TValue> dictionary, TKey key, TValue defaultValue);
static member GetValueOrDefault : System.Collections.Immutable.IImmutableDictionary<'Key, 'Value> * 'Key * 'Value -> 'Value
<Extension()>
Public Function GetValueOrDefault(Of TKey, TValue) (dictionary As IImmutableDictionary(Of TKey, TValue), key As TKey, defaultValue As TValue) As TValue

型パラメーター

TKey

キーの型。

TValue

値の型。

パラメーター

dictionary
IImmutableDictionary<TKey,TValue>

値を取得するディクショナリ。

key
TKey

検索用のキー。

defaultValue
TValue

ディクショナリに一致するキーが見つからない場合に返される既定値。

返品

TValue

キーの値。一致するキーが見つからなかった場合は defaultValue

適用対象