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.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- valueFactory
- Type: System.Func(Of T)
The Func(Of TResult) invoked to produce a lazily-initialized value when an attempt is made to retrieve Value without it having been previously initialized.
- trackAllValues
- Type: System.Boolean
Whether to track all values set on the instance and expose them via the Values property.
| Exception | Condition |
|---|---|
| ArgumentNullException | valueFactory is a Nothing reference (Nothing in Visual Basic). |
Show: