CollectionsMarshal.GetValueRefOrNullRef<TKey,TValue> 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
에 있는 참조 TValue 또는 에 Dictionary<TKey,TValue> 없는 경우 참조 null 를 dictionary가져옵니다.
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)하여 검색할 수 있습니다.