
C# Programlama – Continue Keyword
Ocak 2, 2022
C# Programlama – Operators
Ocak 2, 2022C# Programlama - Break Keyword
Break Keyword Örnekleri:
using System;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
//**********************BreakKeyword******************
while (true)
{
Console.WriteLine("Command : ");
if ("quit" == Console.ReadLine())
{
break;
}
}
Console.WriteLine("Quit command is executed");
//*****************************************************
while (true)
{
Console.WriteLine("Password : ");
if ("safak" == Console.ReadLine())
{
Console.WriteLine("Successful.");
break;
}
else
{
Console.WriteLine("Try again : ");
continue;
}
}
Console.ReadKey();
}
}
}