ConcurrentDictionary<TKey,TValue>.TryGetValue(TKey, TValue) 메서드

정의

지정된 키에 연결된 값을 ConcurrentDictionary<TKey,TValue>에서 가져오려고 시도합니다.

public:
 virtual bool TryGetValue(TKey key, [Runtime::InteropServices::Out] TValue % value);
public bool TryGetValue (TKey key, out TValue value);
abstract member TryGetValue : 'Key * 'Value -> bool
override this.TryGetValue : 'Key * 'Value -> bool
Public Function TryGetValue (key As TKey, ByRef value As TValue) As Boolean

매개 변수

key
TKey

가져올 값의 키입니다.

value
TValue

이 메서드가 반환될 경우 지정된 키를 가진 ConcurrentDictionary<TKey,TValue>의 개체를 포함하거나, 작업에 실패한 경우 해당 형식의 기본값을 포함합니다.

반환

키가 ConcurrentDictionary<TKey,TValue>에 있으면 true이고, 그렇지 않으면 false입니다.

구현

예외

key이(가) null인 경우

적용 대상

추가 정보