Share via


IAnnotationDictionary.TryGetValue Method

Definition

Overloads

TryGetValue<T>(T)

Gets the object that has the specified type.

TryGetValue<T>(Object, T)

Gets the object that has the specified type and is associated with the specified key.

TryGetValue<T>(T)

Gets the object that has the specified type.

public:
generic <typename T>
 bool TryGetValue([Runtime::InteropServices::Out] T % value);
public bool TryGetValue<T> (out T value);
abstract member TryGetValue : 'T -> bool
Public Function TryGetValue(Of T) (ByRef value As T) As Boolean

Type Parameters

T

The type of the object to get. This is the key that is associated with the object.

Parameters

value
T

When this method returns, contains the object associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.

Returns

true if the dictionary contains an object of type T; otherwise, false.

Applies to

TryGetValue<T>(Object, T)

Gets the object that has the specified type and is associated with the specified key.

public:
generic <typename T>
 bool TryGetValue(System::Object ^ key, [Runtime::InteropServices::Out] T % value);
public bool TryGetValue<T> (object key, out T value);
abstract member TryGetValue : obj * 'T -> bool
Public Function TryGetValue(Of T) (key As Object, ByRef value As T) As Boolean

Type Parameters

T

The type of the object to get.

Parameters

key
Object

The key of the object to get.

value
T

When this method returns, contains the object associated with the specified key, if the key is found and the object has the type T; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.

Returns

true if the dictionary contains an object with the specified key and the object has the type T; otherwise, false.

Applies to