Using Boolean Switch : BooleanSwitch « Development « C# / CSharp Tutorial






using System;
using System.IO;
using System.Diagnostics;

class MainClass
{
  static BooleanSwitch MySwitch = new BooleanSwitch("MyData", "MyModule");
  [STAThread]
  static void Main(string[] args)
  {
    MySwitch.Enabled = true;
    if (MySwitch.Enabled)
      Console.WriteLine("Error happened!");
  }
}
Error happened!








14.23.BooleanSwitch
14.23.1.Using Boolean Switch