Language Basics C# Book

while loop statement uses a bool value to control a loop body.
The while loop has the following form.
while(bool expression){
loop body
}
using System;
class Program
{
static void Main(string[] args)
{
int i = 5;
while (i > 0)
{
Console.WriteLine(i);
i--;
}
}
}
The output:
5
4
3
2
1