Bagikan melalui


HealthMonitoringSection.Enabled Properti

Definisi

Mendapatkan atau menetapkan nilai yang menunjukkan apakah pemantauan kesehatan diaktifkan.

public:
 property bool Enabled { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("enabled", DefaultValue=true)]
public bool Enabled { get; set; }
[<System.Configuration.ConfigurationProperty("enabled", DefaultValue=true)>]
member this.Enabled : bool with get, set
Public Property Enabled As Boolean

Nilai Properti

true jika pemantauan kesehatan diaktifkan; jika tidak, false. Defaultnya adalah true.

Atribut

Contoh

Contoh kode berikut menunjukkan cara mendapatkan nilai saat ini dari Enabled properti dan cara menonaktifkan pemantauan kesehatan dengan mengatur properti ini ke nilai false. Contoh kode ini adalah bagian dari contoh yang lebih besar yang disediakan untuk HealthMonitoringSection kelas .


// Get the current Enabled property value.
Boolean enabledValue = healthMonitoringSection.Enabled;

// Set the Enabled property to false.
healthMonitoringSection.Enabled = false;

' Get the current Enabled property value.
Dim enabledValue As Boolean = healthMonitoringSection.Enabled

' Set the Enabled property to False.
healthMonitoringSection.Enabled = False

Berlaku untuk