Using BooleanSwitch : Debug Trace « Development Class « C# / C Sharp
- C# / C Sharp
- Development Class
- Debug Trace
Using BooleanSwitch

/*
* C# Programmers Pocket Consultant
* Author: Gregory S. MacBeth
* Email: [email protected]
* Create Date: June 27, 2003
* Last Modified Date:
* Version: 1
*/
using System;
using System.IO;
using System.Diagnostics;
namespace Client.Chapter_16___Debugging
{
public class UsingBooleanSwitch
{
static BooleanSwitch MySwitch = new BooleanSwitch("MyData", "MyModule");
[STAThread]
static void Main(string[] args)
{
MySwitch.Enabled = true;
if (MySwitch.Enabled)
Console.WriteLine("Error happened!");
}
}
}
Related examples in the same category