System.Threading.ThreadLocal<T>.Value Property

Gets or sets the value of this instance for the current thread.

Syntax

[System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
public T Value { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

If this instance was not previously initialized for the current thread, accessing ThreadLocal`1.Value will attempt to initialize it. If an initialization function was supplied during the construction, that initialization will happen by invoking the function to retrieve the initial value for ThreadLocal`1.Value. Otherwise, the default value of will be used. If an exception is thrown, that exception is cached and thrown on each subsequent access of the property.

Requirements

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