as

Saturday, 25 January 2014

How to wait for few seconds in C#?

We can wait for specific amount of time using Thread.Sleep method.
Threading related classes are put in the System.Threading namespace.

using System.Threading;


int milliseconds = 9000;
Thread.Sleep(milliseconds);

Above code will wait for 9 seconds and then continue to next statement in C#.

What do you think on this topic? Please express your opinion through comment below

Sponsored Links

Popular Posts

Comments

ShareThis