語言

EventMappingSettings.Name 屬性

定義

取得或設定物件名稱 EventMappingSettings 。

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

屬性值

那個物體的名字 EventMappingSettings 。 預設為空字串(“”)。

屬性

範例

以下程式碼範例說明如何使用該 Name 屬性。 此程式碼範例是本類別更大範例 HealthMonitoringSection 的一部分。

eventMappingSetting.Name = "All Errors";
eventMappingSetting.Name = "All Errors"

備註

需要一個獨特的名稱。 重複名稱可能導致儲存設定區塊時資料遺失。

適用於

另請參閱