ConcurrentDictionary<TKey, TValue>::TryGetValue Method (TKey, TValue%)
Attempts to get the value associated with the specified key from the System.Collections.Concurrent::ConcurrentDictionary<TKey, TValue>.
Assembly: mscorlib (in mscorlib.dll)
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::Booleantrue if the key was found in the System.Collections.Concurrent::ConcurrentDictionary<TKey, TValue>; otherwise, false.
| Exception | Condition |
|---|---|
| ArgumentNullException | key is null. |
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1