Blocks the current thread for the specified number of milliseconds.
- millisecondsTimeout
- A int containing the number of milliseconds for which the thread is blocked. Specify zero to indicate that this thread should be suspended temporarily to allow other waiting threads to execute. Specify Timeout.Infinite to block the thread indefinitely.
Type Reason ArgumentOutOfRangeException The value of millisecondsTimeout is negative and is not equal to Timeout.Infinite .
The thread will not be scheduled for execution by the operating system for the amount of time specified. This method changes the state of the thread to include ThreadState.WaitSleepJoin.
Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0