Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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:
virtual bool TryGetValue(
	TKey key,
	[OutAttribute] TValue% value
) sealed

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:
© 2017 Microsoft