System.Diagnostics.BooleanSwitch.Enabled Property

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


public bool Enabled { get; set; }


Documentation for this section has not yet been entered.


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.


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.


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