ThreadLocal(T) Constructor (Func(T))
Collapse the table of content
Expand the table of content

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.

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

'Declaration
Public Sub New ( _
	valueFactory As Func(Of T) _
)

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.

ExceptionCondition
ArgumentNullException

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

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft