Slowing down a process

By Kadir Camoglu Feb 17, 2007
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

Kadir Camoglu

Kadir Camoglu lives in Istanbul, Turkey.He has been programming since 1990. He is a writer also. He wrote two books in Turkish. SQL Server 2005 Express Edition and Visual Basic 2005 Express Edition. Recently he is workin... Read more

COMMENT USING

PREMIUM SPONSORS

Hire Mobile & Web Developer on demand. 100% satisfaction. Try for 1 week or Money Back. Local and remote developers available all over USA.

Latest Blogs