Teilen über


HealthMonitoringSection.Enabled Eigenschaft

Definition

Ruft einen Wert ab, der angibt, ob die Systemüberwachung aktiviert ist, oder legt diesen fest.

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

true, wenn die Systemüberwachung aktiviert ist, andernfalls false. Der Standardwert ist true.

Attribute

Beispiele

Das folgende Codebeispiel zeigt, wie Sie den aktuellen Wert aus der Enabled -Eigenschaft abrufen und die Integritätsüberwachung deaktivieren, indem Sie diese Eigenschaft auf den Wert festlegen false. 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: