Freigeben über


HealthMonitoringSection.Enabled Eigenschaft

Definition

Dient zum Abrufen oder Festlegen eines Werts, der angibt, ob die Integritätsüberwachung aktiviert ist.

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

Eigenschaftswert

truewenn die Integritätsüberwachung aktiviert ist; andernfalls . false Der Standardwert lautet true.

Attribute

Beispiele

Das folgende Codebeispiel zeigt, wie der aktuelle Wert aus der Enabled Eigenschaft abgerufen wird und wie Sie die Integritätsüberwachung deaktivieren, indem Sie diese Eigenschaft auf einen Wert von falsefestlegen. Dieses Codebeispiel ist Teil eines größeren Beispiels, das für die HealthMonitoringSection Klasse bereitgestellt wird.


// 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

Gilt für: