c# while loop

C#
int n = 0;
while (n < 5)
{
    Console.WriteLine(n);
    n++;
}
int i = 0;

while (i < 10)
{
    Console.WriteLine("Value of i: {0}", i);

    i++;
}
// To forcibly exit a while loop use 'break'
while (true)
{
	// Do something
  
	if (conditional)
    {
    	break;
  	}
}
Source

Also in C#: