ThreadLocal(Of T) Constructor (Func(Of T))
[ 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 System.Func(Of TResult) invoked to produce a lazily-initialized value when an attempt is made to retrieve Value without it having been previously initialized.
| Exception | Condition |
|---|---|
| ArgumentNullException | valueFactory is a null reference (Nothing in Visual Basic). |
Show: