// In a console application:
Environment.Exit(0);
// In a WPF application:
Close();
while (playerIsAlive)
{
// this code will keep running
if (playerIsAlive == false)
{
// eventually if this stopping condition is true,
// it will break out of the while loop
break;
}
}
// rest of the program will continue
continue;