SafeHandle.IsClosed SafeHandle.IsClosed SafeHandle.IsClosed SafeHandle.IsClosed Property

定义

获取一个值,该值指示句柄是否已关闭。Gets a value indicating whether the handle is closed.

public:
 property bool IsClosed { bool get(); };
public bool IsClosed { get; }
member this.IsClosed : bool
Public ReadOnly Property IsClosed As Boolean

属性值

如果句柄已关闭,则为true ;否则为 falsetrue if the handle is closed; otherwise, false.

注解

方法返回一个值,该值指示SafeHandle对象的句柄是否不再与本机资源关联。 IsClosedThe IsClosed method returns a value indicating whether the SafeHandle object's handle is no longer associated with a native resource. 这与IsInvalid属性的定义不同,后者计算给定的句柄是否始终被视为无效。This differs from the definition of the IsInvalid property, which computes whether a given handle is always considered invalid. 此方法在以下true情况下返回值: IsClosedThe IsClosed method returns a true value in the following cases:

安全性

SecurityPermission
用于调用非托管代码的权限。for permission to call unmanaged code. 安全操作: LinkDemandSecurity action: LinkDemand. 关联的枚举:UnmanagedCodeAssociated enumeration: UnmanagedCode

适用于