Skip to content

M_CodeJam_Threading_ConcurrentLazyDictionary_2_TryGetValue

Andrew Koryavchenko edited this page Jun 17, 2018 · 5 revisions

ConcurrentLazyDictionary(TKey, TValue).TryGetValue Method

Gets the value that is associated with the specified key.

Namespace: CodeJam.Threading
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0

Syntax

C#

public bool TryGetValue(
	TKey key,
	out TValue value
)

VB

Public Function TryGetValue ( 
	key As TKey,
	<OutAttribute> ByRef value As TValue
) As Boolean

F#

abstract TryGetValue : 
        key : 'TKey * 
        value : 'TValue byref -> bool 
override TryGetValue : 
        key : 'TKey * 
        value : 'TValue byref -> bool 

Parameters

 

key
Type: TKey
The key to locate.
value
Type: TValue
When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.

Return Value

Type: Boolean
true if the object that implements the IReadOnlyDictionary(TKey, TValue) interface contains an element that has the specified key; otherwise, false.

Implements

IReadOnlyDictionary(TKey, TValue).TryGetValue(TKey, TValue)

Exceptions

 

Exception Condition
ArgumentNullException key is null.

See Also

Reference

ConcurrentLazyDictionary(TKey, TValue) Class
CodeJam.Threading Namespace

Clone this wiki locally