Share via


RuleSettings.Profile 屬性

定義

取得或設定適用這項規則之 ProfileSettings 物件的名稱。

public:
 property System::String ^ Profile { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("profile", DefaultValue="")]
public string Profile { get; set; }
[<System.Configuration.ConfigurationProperty("profile", DefaultValue="")>]
member this.Profile : string with get, set
Public Property Profile As String

屬性值

String

適用這項規則的 ProfileSettings 物件名稱。

屬性

範例

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

ruleSetting.Profile = "Custom";
ruleSetting.Profile = "Custom"

備註

ProfileSettings這個屬性所參考的物件必須包含在同時包含這個的相同 HealthMonitoringSection 物件RuleSettings

物件。

適用於

另請參閱