int sleepTime = 1000; // in mills
Task.Delay(sleepTime).Wait();
// or
Thread.Sleep(sleepTime);
// Thread Sleep vs Task Delay
int delayInSec = 3;
// Using Thread Sleep
Thread.Sleep(delayInSec * 1000);
// Using Task Delay
Task.Delay(delayInSec * 1000).Wait();