語言

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

屬性值

true 若程式碼必須 為 Execution 執行 ,則 false。

屬性

例外狀況

呼叫此方法的程式碼不具備 ControlPolicy。

備註

若此屬性為 false,則 不符 Execution 的程式碼也能執行。 執行檢查成本高昂,且可能消除懶惰政策解決的優勢。 此特性用於在需要時停用執行檢查。

對此屬性的變更不會持續存在,直到 SavePolicy 被呼叫為止。 新的程序不會受到變更影響,直到變更被持續存在登錄檔。

適用於