Managing Debug Code with the BooleanSwitch
Note that I have made no assertion about the amount of code controlled by a BooleanSwitch. The sky is the limit. The real rule of thumb is that you probably don't want to use switches to change behavior unexpectedly. For example, using a BooleanSwitch to turn on diagnostics code seems like a good use. You could even disable some features in trial code and ship an updated .config file to turn features on after a customer purchases your code. Enabling features upon purchase would be considered an expected behavior.