ThreadLocal<T>.ToString Method ()

.NET Framework (current version)
 

Creates and returns a string representation of this instance for the current thread.

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

public override string ToString()

Return Value

Type: System.String

The result of calling ToString on the Value.

Exception Condition
ObjectDisposedException

The ThreadLocal<T> instance has been disposed.

NullReferenceException

The Value for the current thread is a null reference (Nothing in Visual Basic).

InvalidOperationException

The initialization function attempted to reference Value recursively.

MissingMemberException

No default constructor is provided and no value factory is supplied.

Calling this method forces initialization for the current thread, as is the case with accessing Value directly.

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
Show: