共用方式為


TrustSection.Level 屬性

定義

取得或設定應用程式執行的安全等級名稱。

public:
 property System::String ^ Level { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("level", DefaultValue="Full", IsRequired=true)]
[System.Configuration.StringValidator(MinLength=1)]
public string Level { get; set; }
[<System.Configuration.ConfigurationProperty("level", DefaultValue="Full", IsRequired=true)>]
[<System.Configuration.StringValidator(MinLength=1)>]
member this.Level : string with get, set
Public Property Level As String

屬性值

信任等級的名稱。 預設值為 "Full"

屬性

範例

以下程式碼範例示範如何使用該 Level 屬性。 此程式碼範例是本類別更大範例 TrustSection 的一部分。

// Display Level property
Console.WriteLine("Level: {0}", configSection.Level);
' Display Level property.
Console.WriteLine("Level: {0}", configSection.Level)

備註

屬性 Level 指定應用程式執行的安全層級。 預設值為 "Full"

共有五種信任等級:

  • 完整

  • 中等

  • 最小

所命名的層級對應於元素<securityPolicy>中定義<trustLevel>的安全層級。

適用於

另請參閱