KGy SOFT

CollectionExtensionsAsThreadSafeT Method

KGy SOFT Core Libraries Help

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

public static LockingCollection<T> AsThreadSafe<T>(
	this ICollection<T> collection
)

Parameters

collection
Type: System.Collections.GenericICollectionT
The collection to create a thread-safe wrapper for.

Type Parameters

T
The type of the elements in the collection.

Return Value

Type: LockingCollectionT
A LockingCollectionT, which provides a thread-safe wrapper for the specified collection.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ICollectionT. 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