c# do while statement code example Example: c# while loop int n = 0; while (n < 5) { Console.WriteLine(n); n++; }