mscorlib 2.0.0.0 4.0.0.0 System.Runtime.InteropServices.SafeHandle

This class derives from the class. It describes the format of an invalid handle. For example, some handles use -1 as an invalid handle value, while others use 0. Further derivations of this class (for example, file or registry handles) can specialize this further. See the class for an example of a class that derives from .

Use the class whenever you need to safely wrap an unmanaged resource that does not have an existing managed wrapper.

Provides a base class for Win32 safe handle implementations in which the value of either 0 or -1 indicates an invalid handle.

- Constructor
  2.0.0.0
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)
  If is set to true, the handle will be disposed at finalization time.

  Initializes a new instance of the class, specifying whether the handle is to be reliably released.

  true to reliably release the handle during the finalization phase; false to prevent reliable release (not recommended).
- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  The common language runtime uses this property to determine whether critical finalization is required.

  Gets a value that indicates whether the handle is invalid.