共用方式為


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>]
static member CheckExecutionRights : bool with get, set
static member 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.")>]
static member CheckExecutionRights : bool with get, set
Public Shared Property CheckExecutionRights As Boolean

屬性值

如果程式碼必須具有 Execution 才能執行,則為 true,否則為 false

屬性

例外狀況

呼叫此方法的程式碼沒有 ControlPolicy

備註

如果這個屬性是 false ,即使沒有 的程式 Execution 代碼也可以執行。 執行檢查的成本很高,而且可以消除延遲原則解決的優點。 提供這個屬性以在必要時停用執行檢查。

在呼叫 之前 SavePolicy ,不會保存此屬性的變更。 在登錄中保存變更之前,新進程不會受到變更的影響。

適用於