static void Main(string[] args) { _settings = new BattleNetSettings(); _ended = new EventWaitHandle(false, EventResetMode.ManualReset); Thread t = new Thread(MainThread); t.IsBackground = false; t.Priority = ThreadPriority.Normal; t.Start(); _ended.WaitOne(); }