📜  c# wait seconds - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:06.105000             🧑  作者: Mango

代码示例3
//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