System.Diagnostics.BooleanSwitch.Enabled Property

Gets or sets a value indicating whether the switch is enabled or disabled.

Syntax

public bool Enabled { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

By default, this field is set to false (disabled). To enable the switch, assign this field the value of true. To disable the switch, assign the value to false. The value of this property is determined by the value of the base class property Switch.SwitchSetting.

Note:

This method uses the System.Security.Permissions.SecurityAction.LinkDemand flag to prevent being called from untrusted code; only the immediate caller is required to have System.Security.Permissions.SecurityPermissionAttribute.UnmanagedCode permission. If your code can be called from partially trusted code, do not pass the user input to System.Runtime.InteropServices.Marshal class methods without validation. For important limitations on using the LinkDemand member, see Demand vs. LinkDemand.

Requirements

Namespace: System.Diagnostics
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0