System.Lazy<T>.IsValueCreated Property

Gets a value that indicates whether a value has been created for this Lazy`1 instance.

Syntax

public bool IsValueCreated { get; }

Value

Documentation for this section has not yet been entered.

Remarks

When lazy initialization occurs for a Lazy`1 instance, it may result in either a value being created or an exception being thrown. If an exception is thrown, subsequent behavior of the Lazy`1 instance depends on whether exception caching is in effect. If the Lazy`1 instance was created by using a constructor that does not specify an initialization function, then exception caching is not in effect. A subsequent attempt to initialize the Lazy`1 might succeed, and after successful initialization the Lazy`1.IsValueCreated property returns true. If the Lazy`1 instance was created with an initialization function (specified by the valueFactory parameter of the Lazy`1 constructor), then exception caching is controlled by the thread safety mode.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 4.0.0.0