Skip to content

Instantly share code, notes, and snippets.

@Strelok78
Last active May 16, 2023 15:53
Show Gist options
  • Save Strelok78/147229b3933a36e66dd68bc58a9f11b5 to your computer and use it in GitHub Desktop.
Save Strelok78/147229b3933a36e66dd68bc58a9f11b5 to your computer and use it in GitHub Desktop.
Executing until the "exit" is entered.
namespace MyCode
{
internal class Program
{
static void Main(string[] args)
{
string exitText = "exit";
bool isWorking = true;
while (isWorking == true)
{
Console.WriteLine("cicle is working");
if (exitText == Console.ReadLine())
{
isWorking = false;
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment