wait c# deleay code example
Example 1: how to wait in c#
System.Threading.Thread.Sleep(Milliseconds);
Example 2: how to delay execution in c#
int sleepTime = 1000; // in mills
Task.Delay(sleepTime).Wait();
// or
Thread.Sleep(sleepTime);
System.Threading.Thread.Sleep(Milliseconds);
int sleepTime = 1000; // in mills
Task.Delay(sleepTime).Wait();
// or
Thread.Sleep(sleepTime);