System.Runtime.InteropServices.CriticalHandle.IsInvalid Property

When overridden in a derived class, gets a value indicating whether the handle value is invalid.

Syntax

[get: System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)]
public abstract bool IsInvalid { get; }

Value

Documentation for this section has not yet been entered.

Remarks

Derived classes must implement the CriticalHandle.IsInvalid property so that the common language runtime can determine whether critical finalization is required. Derived classes must provide an implementation that suits the general type of handle they support (0 or -1 is invalid). These classes can then be further derived for specific safe handle types.

Unlike the CriticalHandle.IsClosed property, which reports whether the System.Runtime.InteropServices.CriticalHandle object has finished using the underlying handle, the CriticalHandle.IsInvalid property calculates whether the given handle value is always considered invalid. Therefore, the CriticalHandle.IsInvalid property always returns the same value for any one handle value.

Requirements

Namespace: System.Runtime.InteropServices
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0