Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to wait in c# console

using System.Threading;

namespace HelloWorld
{
  internal class Program
  {
    static void Main(string[] args)
    {
      Console.WriteLine("Hello");
      Thread.Sleep(1000); //Wait 1 second
      Console.WriteLine("World");
      Console.ReadKey(); // End when key pressed
    }
  }
}
 
PREVIOUS NEXT
Tagged: #wait #console
ADD COMMENT
Topic
Name
3+4 =