OrderedDictionary<TKey,TValue>.TryGetValue 메서드

정의

오버로드

Name Description
TryGetValue(TKey, TValue)

지정된 키와 연결된 값을 가져옵니다.

TryGetValue(TKey, TValue, Int32)

지정된 키와 연결된 값을 가져옵니다.

TryGetValue(TKey, TValue)

Source:
OrderedDictionary.cs
Source:
OrderedDictionary.cs
Source:
OrderedDictionary.cs

지정된 키와 연결된 값을 가져옵니다.

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

이 메서드가 반환될 때 키가 있으면 지정된 키와 연결된 값입니다. 그렇지 않으면 매개 변수 형식의 기본값입니다 value . 이 매개 변수는 초기화되지 않은 상태로 전달됩니다.

반품

true 구현 IDictionary<TKey,TValue> 하는 개체에 지정된 키가 있는 요소가 포함되어 있으면 이고, false그렇지 않으면 .

구현

예외

keynull입니다.

적용 대상

TryGetValue(TKey, TValue, Int32)

Source:
OrderedDictionary.cs
Source:
OrderedDictionary.cs

지정된 키와 연결된 값을 가져옵니다.

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

매개 변수

key
TKey

가져올 값의 키입니다.

value
TValue

이 메서드가 반환될 때 키가 있으면 지정된 키와 연결된 값이 포함됩니다. 그렇지 않으면 값 매개 변수 형식의 기본값입니다.

index
Int32

찾은 경우의 key 인덱스입니다. 그렇지 않으면 -1입니다.

반품

true OrderedDictionary<TKey,TValue> 지정된 키를 가진 요소가 포함되어 있으면 이고, false그렇지 않으면 .

예외

keynull입니다.

적용 대상