private static void Pause()
{
for(;;)
{
Console.WriteLine();
Console.WriteLine("Press any key to stop...");
Console.WriteLine();
Console.ReadKey(true);
Console.WriteLine("Stop the application? Press Escape to stop");
ConsoleKeyInfo info = Console.ReadKey(true);
if(info.Key == ConsoleKey.Escape)
break;
}
Console.WriteLine("stopping...");
}