SecurityManager.CheckExecutionRights 属性

定义

注意

现已弃用此 API。

注意

Because execution permission checks can no longer be turned off, the CheckExecutionRights property no longer has any effect.

获取或设置一个值,该值指示代码是否必须具有 Execution 才能执行。

public:
 static property bool CheckExecutionRights { bool get(); void set(bool value); };
[System.Obsolete]
public static bool CheckExecutionRights { get; set; }
public static bool CheckExecutionRights { get; set; }
[System.Obsolete("Because execution permission checks can no longer be turned off, the CheckExecutionRights property no longer has any effect.")]
public static bool CheckExecutionRights { get; set; }
[<System.Obsolete>]
member this.CheckExecutionRights : bool with get, set
member this.CheckExecutionRights : bool with get, set
[<System.Obsolete("Because execution permission checks can no longer be turned off, the CheckExecutionRights property no longer has any effect.")>]
member this.CheckExecutionRights : bool with get, set
Public Shared Property CheckExecutionRights As Boolean

属性值

Boolean

如果代码必须具有 Execution 才能执行,则为 true;否则为 false

属性

例外

调用此方法的代码不含 ControlPolicy

注解

如果此属性是 false,即使没有 Execution 执行的代码也是如此。 执行检查成本高昂,可以消除延迟策略解析的优点。 提供此属性以在需要时禁用执行检查。

在调用此属性之前 SavePolicy ,不会持久保存对此属性的更改。 在注册表中持久保存更改之前,新进程不会受到影响。

适用于