ThreadLocal<T> Constructor (Boolean)

.NET Framework (current version)
 

Initializes the ThreadLocal<T> instance and specifies whether all values are accessible from any thread.

Namespace:   System.Threading
Assembly:  mscorlib (in mscorlib.dll)

public:
ThreadLocal(
	bool trackAllValues
)

Parameters

trackAllValues
Type: System::Boolean

true to track all values set on the instance and expose them through the Values property; false otherwise.

If trackAllValues is false, only the value of this instance for the current thread is accessible. Attempting to use the Values property to retrieve all values throws an InvalidOperationException exception.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.5
Portable Class Library
Supported in: portable .NET platforms
Windows Phone Silverlight
Available since 8.0
Windows Phone
Available since 8.1
Return to top
Show: