KGy SOFT

DictionaryExtensionsAsThreadSafeTKey, TValue Method

KGy SOFT Core Libraries Help

Namespace:  KGySoft.CoreLibraries
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 5.0.0
Syntax

public static LockingDictionary<TKey, TValue> AsThreadSafe<TKey, TValue>(
	this IDictionary<TKey, TValue> dictionary
)

Parameters

dictionary
Type: System.Collections.GenericIDictionaryTKey, TValue
The dictionary to create a thread-safe wrapper for.

Type Parameters

TKey
The type of the keys in the dictionary.
TValue
The type of the values in the dictionary.

Return Value

Type: LockingDictionaryTKey, TValue
A LockingDictionaryTKey, TValue, which provides a thread-safe wrapper for the specified dictionary.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IDictionaryTKey, TValue. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference