Use Thread.Sleep to pause a process for a while.
for (int i = 0; i <= 10; i++) {
Console.WriteLine(i);
System.Threading.Thread.Sleep(1000);
}
This code pauses each iteration for a second.
1000 milisecond = 1 second
While coding, we need to slow down working some logic
Use Thread.Sleep to pause a process for a while.
for (int i = 0; i <= 10; i++) {
Console.WriteLine(i);
System.Threading.Thread.Sleep(1000);
}
This code pauses each iteration for a second.
1000 milisecond = 1 second
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegisterMembers onlyFeatured eBookClaude for AI-Native BuildersDownload nowWrite a blog post and earn +250 SHARP when it is approved.
Write a blog
Join the conversation! Your thoughts help the community grow.