using System; using System.Threading; class Program { static void Main(string[] args) { Console.WriteLine("Start"); Thread.Sleep(2000); Console.WriteLine("End"); } }
using System; using System.Threading; class Program { static void Main(string[] args) { string[] messages = {"Hello", "World", "Welcome", "to", "C#"}; foreach (string message in messages) { Console.WriteLine(message); Thread.Sleep(1000); } } }In this example, the console application writes a sequence of messages with a 1-second delay between each message. This can create an animated message or simulate the delay in a long-running process. Package library: System.Threading