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.

ConcurrentDictionary<TKey, TValue>::TryGetValue Method (TKey, TValue%)

.NET Framework (current version)
 

Attempts to get the value associated with the specified key from the System.Collections.Concurrent::ConcurrentDictionary<TKey, TValue>.

Namespace:   System.Collections.Concurrent
Assembly:  mscorlib (in mscorlib.dll)

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

Parameters

key
Type: TKey

The key of the value to get.

value
Type: TValue%

When this method returns, contains the object from the System.Collections.Concurrent::ConcurrentDictionary<TKey, TValue> that has the specified key, or the default value of the type if the operation failed.

Return Value

Type: System::Boolean

true if the key was found in the System.Collections.Concurrent::ConcurrentDictionary<TKey, TValue>; otherwise, false.

Exception Condition
ArgumentNullException

key is null.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1
Return to top
Show:
© 2017 Microsoft