ImmutableDictionary<TKey, TValue>.TryGetValue Method (TKey, TValue)

 

Gets the value associated with the specified key.

Namespace:   System.Collections.Immutable
Assembly:  System.Collections.Immutable (in System.Collections.Immutable.dll)

public bool TryGetValue(
	TKey key,
	out TValue value
)

Parameters

key
Type: TKey

The key whose value will be retrieved.

value
Type: TValue

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

Return Value

Type: System.Boolean

true if the object that implements the dictionary contains an element with the specified key; otherwise, false.

Exception Condition
ArgumentNullException

key is null.

Return to top
Show: