A do
statement conditionally executes a statement one or more times.
The example
using System; class Test { static void Main() { string s; do { s = Console.ReadLine(); } while (!string.Equals(s, "Exit")); } }
reads from the console until the user types "Exit" and presses the enter key.