while loop in c#

C#
int i = 0;

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

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

Source

Also in C#: