共用方式為


SecurityManager.SavePolicyLevel(PolicyLevel) 方法

定義

警告

此 API 現已淘汰。

警告

This method is obsolete and will be removed in a future release of the .NET Framework. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.

儲存使用 LoadPolicyLevelFromFile(String, PolicyLevelType) 載入之已修改的安全性原則層級。

public:
 static void SavePolicyLevel(System::Security::Policy::PolicyLevel ^ level);
[System.Obsolete]
public static void SavePolicyLevel (System.Security.Policy.PolicyLevel level);
public static void SavePolicyLevel (System.Security.Policy.PolicyLevel level);
[System.Obsolete("This method is obsolete and will be removed in a future release of the .NET Framework. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
public static void SavePolicyLevel (System.Security.Policy.PolicyLevel level);
[<System.Obsolete>]
static member SavePolicyLevel : System.Security.Policy.PolicyLevel -> unit
static member SavePolicyLevel : System.Security.Policy.PolicyLevel -> unit
[<System.Obsolete("This method is obsolete and will be removed in a future release of the .NET Framework. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")>]
static member SavePolicyLevel : System.Security.Policy.PolicyLevel -> unit
Public Shared Sub SavePolicyLevel (level As PolicyLevel)

參數

level
PolicyLevel

要儲存的原則層級物件。

屬性

例外狀況

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

這個方法使用程式代碼存取安全性 (CAS) 原則,這在 .NET Framework 4 中已過時。 若要啟用 CAS 原則對舊版 .NET Framework 的相容性,請使用 <legacyCasPolicy> 項目

備註

PolicyLevel將會儲存到載入所在的相同位置。

適用於