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

屬性值

String

RuleSettings 物件的名稱。 預設值為空字串 ("")。

屬性

範例

下列程式碼範例示範如何使用 Name 屬性。 此程式碼範例是提供給 類別之較大範例的 HealthMonitoringSection 一部分。

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

備註

唯一名稱是必要項。

適用於

另請參閱