Answers for "how to make the program wait c#"

C#
14

c# Sleep

using System.Threading;

static void Main()
{
  //do stuff
  Thread.Sleep(5000) //will sleep for 5 sec
}
Posted by: Guest on March-02-2020
14

how to wait in c#

System.Threading.Thread.Sleep(Milliseconds);
Posted by: Guest on July-02-2020
0

c# wait seconds

//wait 2 seconds
Thread.Sleep(2000);
Task.Delay(2000);

//Both are valid options but I would recommend Task.Delay() as you can still use your UI while waiting
Posted by: Guest on December-08-2020

Code answers related to "how to make the program wait c#"

C# Answers by Framework

Browse Popular Code Answers by Language