TrustLevel(String, String) 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立一個類別實例 TrustLevel ,並根據所提供的值初始化,這些值定義了特定安全層級映射到命名政策檔案的設定。
public:
TrustLevel(System::String ^ name, System::String ^ policyFile);
public TrustLevel(string name, string policyFile);
new System.Web.Configuration.TrustLevel : string * string -> System.Web.Configuration.TrustLevel
Public Sub New (name As String, policyFile As String)
參數
- name
- String
一個命名的安全層級,映射到一個政策檔案。
- policyFile
- String
包含指定安全層級安全政策設定的設定檔。
範例
以下程式碼範例示範如何使用 TrustLevel 建構子。 此程式碼範例是本類別更大範例 TrustLevel 的一部分。
// Instantiate a new TrustLevel object.
TrustLevel TrustLevel2 =
new TrustLevel("myLevel2", "myLevel2.config");
' Instantiate a new TrustLevel object.
Dim TrustLevel2 As TrustLevel = _
New TrustLevel("myLevel2", "myLevel2.config")
備註
TrustLevel建構子透過提供的參數來建立TrustLevel物件。