This documentation is archived and is not being maintained.

ReadOnlyDictionary<TKey, TValue>::TryGetValue Method

Gets the value that is paired with the specified key and stores it in value.

Namespace:  Microsoft.TeamFoundation.Client
Assembly:  Microsoft.TeamFoundation.Client (in Microsoft.TeamFoundation.Client.dll)

public:
virtual bool TryGetValue(
	TKey key, 
	[OutAttribute] TValue% value
) sealed

Parameters

key
Type: TKey

The key to search for.

value
Type: TValue%

Is set to the value of the key in the dictionary if the key is in the dictionary.

Return Value

Type: System::Boolean
Returns true if thekey was in the dictionary and its value was stored in value.
False if the key was not found and itsvalue is unchanged.

Implements

IDictionary<TKey, TValue>::TryGetValue(TKey, TValue%)

Show: