private void StartShutdownWatchdog(int WatchdogTimeout) { Timer WatchdogTimer; WatchdogTimer = new Timer( delegate(object State) { Environment.Exit(-1); }, null, WatchdogTimeout * 1000, Timeout.Infinite); ShutdownWatchdogTimer = WatchdogTimer; }