while do method c# example
Example: while in c#
using System;
namespace ConsoleApp3
{
class Program
{
static void Main(string[] args)
{
int i = 0;
while (true)
{
Console.WriteLine("i = {0}", i);
i++;
if (i > 10)
break;
}
}
}
}