ToString Method
Collapse the table of content
Expand the table of content

ThreadLocal<T>.ToString Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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.


The ThreadLocal<T> instance has been disposed.


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


The initialization function attempted to reference Value recursively.


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.

Windows Phone OS

Supported in: 8.1, 8.0

© 2017 Microsoft