ConsoleKeyInfo keyInfo;
do {
// do you work here
Console.WriteLine("Press Y to continue, N to abort");
do {
keyInfo = Console.ReadKey();
} while (keyInfo.Key != ConsoleKey.N || keyInfo.Key != ConsoleKey.Y);
} while (keyInfo.Key != ConsoleKey.N);
bool shouldContinue;
do {
// get input
// do operation
// ask user to continue
if ( Console.ReadLine() == "y" ) {
shouldContinue = true;
}
} while (shouldContinue);