ImmutableDictionary.GetValueOrDefault 메서드

정의

오버로드

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

일치하는 키가 사전에 있는 경우 지정된 키의 값을 가져옵니다.

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

일치하는 키가 사전에 있는 경우 지정된 키의 값을 가져옵니다.

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

Source:
ImmutableDictionary.cs
Source:
ImmutableDictionary.cs
Source:
ImmutableDictionary.cs
Source:
ImmutableDictionary.cs
Source:
ImmutableDictionary.cs
Source:
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)

Source:
ImmutableDictionary.cs
Source:
ImmutableDictionary.cs
Source:
ImmutableDictionary.cs
Source:
ImmutableDictionary.cs
Source:
ImmutableDictionary.cs
Source:
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 일치하는 키를 찾을 수 없는 경우

적용 대상