Namespace:
System.Threading
Assembly:
System.Threading (in System.Threading.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Sub New ( _
valueFactory As Func(Of T) _
) |
C# |
---|
public ThreadLocal(
Func<T> valueFactory
) |
Parameters
- valueFactory
- Type: System..::.Func<(Of <(T>)>)
The Func<(Of <(T>)>) invoked to produce a lazily-initialized value when
an attempt is made to retrieve Value without it having been previously initialized.
Exceptions
Exception | Condition |
---|
System..::.ArgumentNullException |
valueFactory is a null reference (Nothing in Visual Basic).
|
See Also