CollectionsMarshal.GetValueRefOrNullRef<TKey,TValue> 메서드

정의

에 있는 참조 TValue 또는 에 Dictionary<TKey,TValue> 없는 경우 참조 nulldictionary가져옵니다.

public:
generic <typename TKey, typename TValue>
 static TValue % GetValueRefOrNullRef(System::Collections::Generic::Dictionary<TKey, TValue> ^ dictionary, TKey key);
public static ref TValue GetValueRefOrNullRef<TKey,TValue> (System.Collections.Generic.Dictionary<TKey,TValue> dictionary, TKey key);
static member GetValueRefOrNullRef : System.Collections.Generic.Dictionary<'Key, 'Value> * 'Key -> 'Value
Public Shared Function GetValueRefOrNullRef(Of TKey, TValue) (dictionary As Dictionary(Of TKey, TValue), key As TKey) As TValue

형식 매개 변수

TKey

키의 형식입니다.

TValue

값의 형식입니다.

매개 변수

dictionary
Dictionary<TKey,TValue>

참조 TValue 를 가져올 사전입니다.

key
TKey

조회에 사용되는 키입니다.

반환

TValue

TValue.에 없는 경우 in 또는 Dictionary<TKey,TValue> 참조에 dictionary대한 참조 null 입니다.

설명

참조 TValue 가 사용 중인 동안에는 항목을 추가하거나 제거 Dictionary<TKey,TValue> 해서는 안 됩니다.

참조 null 를 호출 System.Runtime.CompilerServices.Unsafe.IsNullRef<T>(T)하여 검색할 수 있습니다.

적용 대상