ExtensionMethods.GetValueIfCreated<T>(Lazy<T>) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the Value of a Lazy<T> if it has been created, or null if it hasn't.
public:
generic <typename T>
where T : class[System::Runtime::CompilerServices::Extension]
static T GetValueIfCreated(Lazy<T> ^ lazy);
public static T GetValueIfCreated<T> (this Lazy<T> lazy) where T : class;
static member GetValueIfCreated : Lazy<'T (requires 'T : null)> -> 'T (requires 'T : null)
<Extension()>
Public Function GetValueIfCreated(Of T As Class) (lazy As Lazy(Of T)) As T
Type Parameters
- T
The type controlled by the lazy initializer
Parameters
- lazy
- Lazy<T>
The lazy initializer
Returns
T