SafeHandle::IsClosed Property
Gets a value indicating whether the handle is closed.
Assembly: mscorlib (in mscorlib.dll)
The IsClosed method returns a value indicating whether the SafeHandle object's handle is no longer associated with a native resource. This differs from the definition of the IsInvalid property, which computes whether a given handle is always considered invalid. The IsClosed method returns a true value in the following cases:
The SetHandleAsInvalid method was called.
The Dispose method or Close method was called and there are no references to the SafeHandle object on other threads.
- SecurityPermission
for permission to call unmanaged code. Security action: LinkDemand. Associated enumeration: SecurityPermissionFlag::UnmanagedCode
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.