ThreadSafeHashSetTTryGetValue Method

Tries to get the actual stored item for the specified equalValue in the ThreadSafeHashSetT. It can be useful to obtain the actually stored reference when the Comparer can consider different instances equal.

Definition

Namespace: KGySoft.Collections
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0
C#
public bool TryGetValue(
	T equalValue,
	out T actualValue
)

Parameters

equalValue  T
The item to search for.
actualValue  T
When this method returns, the actually stored value, if the equalValue is present in the ThreadSafeHashSetT judged by the current Comparer; otherwise, the default value for the type T. This parameter is passed uninitialized.

Return Value

Boolean
if an item equal to equalValue was found in the ThreadSafeHashSetT; otherwise, .

See Also