c# do code example
Example 1: c# do while
do
{
//Code here (will run at least once)
} while (true); //Condition to test for here
Example 2: c# do loop
int i = 0;
do
{
Console.WriteLine("Value of i: {0}", i);
i++;
} while (i < 10);
Example 3: c# do
int n = 0;
do
{
Console.WriteLine(n);
n++;
} while (n < 5);
Example 4: c# do
int i = 0;
do
{
Console.WriteLine("i = {0}", i);
i++;
} while (i < 5);