Share via


RuleSettings.Name 属性

定义

获取或设置 RuleSettings 对象的名称。

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

属性值

RuleSettings 对象的名称。 默认值为空字符串 ("")。

属性

示例

下面的代码示例说明如何使用 Name 属性。 此代码示例是为 HealthMonitoringSection 类提供的一个更大示例的一部分。

ruleSetting.Name = "All Errors Custom";
ruleSetting.Name = "All Errors Custom"

注解

必须提供唯一的名称。

适用于

另请参阅