TrustSection.Level 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置应用程序将运行的安全级别的名称。
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"。
有五个可用的信任级别:
完整
高
中等
低
最小
命名级别对应于元素<trustLevel><securityPolicy>中定义的安全级别。