ThreadLocal<(Of <(T>)>) Constructor (Func<(Of <(T>)>), Boolean)

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

Initializes the ThreadLocal<(Of <(T>)>) instance with the specified valueFactory function.

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

Syntax

Public Sub New ( _
    valueFactory As Func(Of T), _
    trackAllValues As Boolean _
)
public ThreadLocal(
    Func<T> valueFactory,
    bool trackAllValues
)

Parameters

  • trackAllValues
    Type: System..::.Boolean
    Whether to track all values set on the instance and expose them via the Values property.

Exceptions

Exception Condition
ArgumentNullException

valueFactory is a nullNothingnullptra null reference (Nothing in Visual Basic) reference (Nothing in Visual Basic).

Version Information

Windows Phone OS

Supported in: 8.1, 8.0

See Also

Reference

ThreadLocal<(Of <(T>)>) Class

ThreadLocal<(Of <(T>)>) Overload

System.Threading Namespace