ThreadLocal<T> Constructor ()

.NET Framework (current version)

The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Initializes the ThreadLocal<T> instance.

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

public ThreadLocal()

The default value of T is used to initialize the instance when Value is accessed for the first time.

This constructor is equivalent to calling the ThreadLocal<T>(Boolean) constructor with a value of false for the trackAllValues argument.

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