NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Thread.Sleep (Int32)

Suspends the current thread for a specified time.

[Visual Basic]
Overloads Public Shared Sub Sleep( _
   ByVal millisecondsTimeout As Integer _
)
[C#]
public static void Sleep(
   int millisecondsTimeout
);
[C++]
public: static void Sleep(
   int millisecondsTimeout
);
[JScript]
public static function Sleep(
   millisecondsTimeout : int
);

Parameters

millisecondsTimeout
The number of milliseconds for which the thread will be suspended.

Exceptions

Exception Type Condition
ArgumentException The timeout value is less than zero.
ThreadInterruptedException The thread is interrupted while sleeping.
SecurityException The caller does not have the appropriate SecurityPermission.

Remarks

If the timeout period is zero, this method forces the thread to give up the remainder of its time slice.

See Also

Thread Class | Thread Members | System.Threading Namespace | Thread.Sleep Overload List