while loop c#

C#
int i = 0;

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

    i++;
}
int i = 0;
while (i < 5) 
{
  Console.WriteLine(i);
  i++;
}// To forcibly exit a while loop use 'break'
while (true)
{
	// Do something
  
	if (conditional)
    {
    	break;
  	}
}int n = 0;
while (n < 5)
{
    Console.WriteLine(n);
    n++;
}

Source

Also in C#: