BCL mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ] 1.0.5000.0 2.0.0.0 4.0.0.0 All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe. System.MarshalByRefObject System.IDisposable System.Runtime.InteropServices.ComVisible(true)

This class is typically used as a base class for synchronization objects. Classes derived from WaitHandle define a signaling mechanism to indicate taking or releasing access to a shared resource, but use the inherited WaitHandle methods to block while waiting for access to shared resources.

Use the static methods of this class to block a thread until one or more synchronization objects receive a signal.

implements the pattern. See Implementing Finalize and Dispose to Clean Up Unmanaged Resources. When you derive from , use the property to store your native handle operating system handle. You do not need to override the protected method unless you use additional unmanaged resources.

Encapsulates operating system–specific objects that wait for exclusive access to shared resources.

- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  To be added.

  Initializes a new instance of the class.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void

  This method is the public version of the method implemented to support the interface.

  This method releases any unmanaged resources held by the current instance. This method can, but is not required to, suppress finalization during garbage collection by calling the method.

  Override this method to release resources allocated in derived classes.

  Use this method to release all resources held by an instance of WaitHandle. Once this method is called, references to the current instance cause undefined behavior.

  When overridden in a derived class, releases all resources held by the current .

  0
- Method
  4.0.0.0
  System.Void

  This method is equivalent to the method, but it can be called by using the interface.

  Call Dispose when you are finished using the . The Dispose method leaves the in an unusable state. After calling Dispose, you must release all references to the so the garbage collector can reclaim the memory that the was occupying.

  For more information, see Cleaning Up Unmanaged Resources and Implementing a Dispose Method.

  Always call Dispose before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's Finalize method.

  Releases all resources used by the current instance of the class.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void ``

  This method is called by the WaitHandle.Dispose() method and the Finalize method. Dispose() invokes this protected method with the parameter set to true. Finalize invokes Dispose with set to false.

  When the parameter is true, this method releases all resources held by any managed objects that this WaitHandle references. This method invokes the Dispose() method of each referenced object.

  Dispose can be called multiple times by other objects. When overriding this method, be careful not to reference objects that have been previously disposed in an earlier call to Dispose or Close.

  When overridden in a derived class, releases the unmanaged resources used by the , and optionally releases the managed resources.

  true to release both managed and unmanaged resources; false to release only unmanaged resources. 0
- Method
  System.Void

  This member has been removed from the dnprdnext and subsequent versions. This topic applies only to the versions listed in "Version Information" later in this topic.

  Application code does not call this method; it is automatically invoked during garbage collection, unless finalization by the garbage collector has been disabled. For more information, see and . This method overrides .

  Releases the resources held by the current instance.

  0
  1.0.5000.0
  2.0.0.0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("In the profiles > 2.x, use SafeHandle instead of Handle")
  System.IntPtr To be added.

  Assigning a new value to the property does not close the previous handle. This can result in a leaked handle.

  Do not use this property in the .NET Framework version 2.0 or later; use the property instead. Setting this property to a valid handle also sets the property, but setting it to can result in a leaked handle.

  Gets or sets the native operating system handle.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.IntPtr

  Used internally to initialize the property.

  Represents an invalid native operating system handle. This field is read-only.

- Property
  2.0.0.0
  4.0.0.0
  get: System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)
  set: System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  Microsoft.Win32.SafeHandles.SafeWaitHandle To be added.

  When you assign a new value to the property, the previous handle will be closed when the previous object is collected. Do not manually close the handle, because this results in an when the attempts to close the handle.

  implements the pattern. See Implementing Finalize and Dispose to Clean Up Unmanaged Resources. When you derive from , use the property to store your native handle operating system handle. You do not need to override the protected method unless you use additional unmanaged resources.

  Gets or sets the native operating system handle.

- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` ``

  This operation is not guaranteed to be atomic. After the current thread signals but before it waits on , a thread that is running on another processor might signal or wait on it.

  Signals one and waits on another.

  true if both the signal and the wait complete successfully; if the wait does not complete, the method does not return.

  The to signal. The to wait on.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` `` `` ``

  This operation is not guaranteed to be atomic. After the current thread signals but before it waits on , a thread that is running on another processor might signal or wait on it.

  If is zero, the method does not block. It tests the state of the and returns immediately.

  ## Notes on Exiting the Context

  The parameter has no effect unless the method is called from inside a nondefault managed context. This can happen if your thread is inside a call to an instance of a class derived from . Even if you are currently executing a method on a class that does not derive from , like , you can be in a nondefault context if a is on your stack in the current application domain.

  When your code is executing in a nondefault context, specifying true for causes the thread to exit the nondefault managed context (that is, to transition to the default context) before executing the method. The thread returns to the original nondefault context after the call to the method completes.

  This can be useful when the context-bound class has . In that case, all calls to members of the class are automatically synchronized, and the synchronization domain is the entire body of code for the class. If code in the call stack of a member calls the method and specifies true for , the thread exits the synchronization domain, allowing a thread that is blocked on a call to any member of the object to proceed. When the method returns, the thread that made the call must wait to reenter the synchronization domain.

  Signals one and waits on another, specifying a time-out interval as a 32-bit signed integer and specifying whether to exit the synchronization domain for the context before entering the wait.

  true if both the signal and the wait completed successfully, or false if the signal completed but the wait timed out.

  The to signal. The to wait on. An integer that represents the interval to wait. If the value is , that is, -1, the wait is infinite. true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it afterward; otherwise, false.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` `` `` ``

  This operation is not guaranteed to be atomic. After the current thread signals but before it waits on , a thread that is running on another processor might signal or wait on it.

  The maximum value for is .

  If is zero, the method does not block. It tests the state of the and returns immediately.

  ## Notes on Exiting the Context

  The parameter has no effect unless the method is called from inside a nondefault managed context. This can happen if your thread is inside a call to an instance of a class derived from . Even if you are currently executing a method on a class that does not derive from , like , you can be in a nondefault context if a is on your stack in the current application domain.

  When your code is executing in a nondefault context, specifying true for causes the thread to exit the nondefault managed context (that is, to transition to the default context) before executing the method. The thread returns to the original nondefault context after the call to the method completes.

  This can be useful when the context-bound class has . In that case, all calls to members of the class are automatically synchronized, and the synchronization domain is the entire body of code for the class. If code in the call stack of a member calls the method and specifies true for , the thread exits the synchronization domain, allowing a thread that is blocked on a call to any member of the object to proceed. When the method returns, the thread that made the call must wait to reenter the synchronization domain.

  Signals one and waits on another, specifying the time-out interval as a and specifying whether to exit the synchronization domain for the context before entering the wait.

  true if both the signal and the wait completed successfully, or false if the signal completed but the wait timed out.

  The to signal. The to wait on. A that represents the interval to wait. If the value is -1, the wait is infinite. true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it afterward; otherwise, false.
- Method
  System.Void

  Calling Dispose allows the resources used by the to be reallocated for other purposes. For more information about Dispose, see Cleaning Up Unmanaged Resources.

  Releases all resources used by the .

  1.0.5000.0
  2.0.0.0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean `` is or one or more elements in the array is . contains elements that are duplicates. The number of objects in is greater than the system permits.

  is new in the .NET Framework version 2.0. In previous versions, the method returns true when a mutex is abandoned. An abandoned mutex often indicates a serious coding error. In the case of a system-wide mutex, it might indicate that an application has been terminated abruptly (for example, by using Windows Task Manager). The exception contains information useful for debugging.

  The method returns when all the handles are signaled. On some implementations, if more than 64 handles are passed, a is thrown. If the array contains duplicates, the call fails with a .

  The method is not supported on threads that have .

  Calling this method overload is equivalent to calling the method overload and specifying -1 (or ) for and true for .

  Waits for all the elements in the specified array to receive a signal.

  true when every element in has received a signal; otherwise the method never returns.

  A WaitHandle array containing the objects for which the current instance will wait. This array cannot contain multiple references to the same object. 0
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` ``

  If is zero, the method does not block. It tests the state of the wait handles and returns immediately.

  The method returns when the wait terminates, which means either when all the handles are signaled or when time-out occurs. On some implementations, if more than 64 handles are passed, a is thrown. If there are duplicates in the array, the call fails with a .

  The method is not supported on threads that have .

  Calling this method overload is the same as calling the overload and specifying false for .

  Waits for all the elements in the specified array to receive a signal, using an value to specify the time interval.

  true when every element in has received a signal; otherwise, false.

  A WaitHandle array containing the objects for which the current instance will wait. This array cannot contain multiple references to the same object (duplicates). The number of milliseconds to wait, or (-1) to wait indefinitely.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` ``

  If is zero, the method does not block. It tests the state of the wait handles and returns immediately.

  The method returns when the wait terminates, which means either all the handles are signaled or a time-out occurs. On some implementations, if more than 64 handles are passed, a is thrown. If the array contains duplicates, the call will fail.

  The method is not supported on threads that have .

  The maximum value for is .

  Calling this method overload is the same as calling the overload and specifying false for .

  Waits for all the elements in the specified array to receive a signal, using a value to specify the time interval.

  true when every element in has received a signal; otherwise, false.

  A WaitHandle array containing the objects for which the current instance will wait. This array cannot contain multiple references to the same object. A that represents the number of milliseconds to wait, or a that represents -1 milliseconds, to wait indefinitely.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean `` `` ``

  If is zero, the method does not block. It tests the state of the wait handles and returns immediately.

  is new in the .NET Framework version 2.0. In previous versions, the method returns true when a mutex is abandoned. An abandoned mutex often indicates a serious coding error. In the case of a system-wide mutex, it might indicate that an application has been terminated abruptly (for example, by using Windows Task Manager). The exception contains information useful for debugging.

  The method returns when the wait terminates, which means either when all the handles are signaled or when time-out occurs. On some implementations, if more than 64 handles are passed, a is thrown. If there are duplicates in the array, the call fails with a .

  The method is not supported on threads that have .

  ## Notes on Exiting the Context

  The parameter has no effect unless the method is called from inside a nondefault managed context. This can happen if your thread is inside a call to an instance of a class derived from . Even if you are currently executing a method on a class that is not derived from , like , you can be in a nondefault context if a is on your stack in the current application domain.

  When your code is executing in a nondefault context, specifying true for causes the thread to exit the nondefault managed context (that is, to transition to the default context) before executing the method. The thread returns to the original nondefault context after the call to the method completes.

  This can be useful when the context-bound class has the attribute. In that case, all calls to members of the class are automatically synchronized, and the synchronization domain is the entire body of code for the class. If code in the call stack of a member calls the method and specifies true for , the thread exits the synchronization domain, allowing a thread that is blocked on a call to any member of the object to proceed. When the method returns, the thread that made the call must wait to reenter the synchronization domain.

  Waits for all the elements in the specified array to receive a signal, using an value to specify the time interval and specifying whether to exit the synchronization domain before the wait.

  true when every element in has received a signal; otherwise, false.

  A WaitHandle array containing the objects for which the current instance will wait. This array cannot contain multiple references to the same object (duplicates). The number of milliseconds to wait, or (-1) to wait indefinitely. true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it afterward; otherwise, false.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean `` `` ``

  If is zero, the method does not block. It tests the state of the wait handles and returns immediately.

  is new in the .NET Framework version 2.0. In previous versions, the method returns true when a mutex is abandoned. An abandoned mutex often indicates a serious coding error. In the case of a system-wide mutex, it might indicate that an application has been terminated abruptly (for example, by using Windows Task Manager). The exception contains information useful for debugging.

  The method returns when the wait terminates, which means either all the handles are signaled or a time-out occurs. On some implementations, if more than 64 handles are passed, a is thrown. If the array contains duplicates, the call will fail.

  The method is not supported on threads that have .

  The maximum value for is .

  ## Notes on Exiting the Context

  The parameter has no effect unless the method is called from inside a nondefault managed context. This can happen if your thread is inside a call to an instance of a class derived from . Even if you are currently executing a method on a class that is not derived from , like , you can be in a nondefault context if a is on your stack in the current application domain.

  When your code is executing in a nondefault context, specifying true for causes the thread to exit the nondefault managed context (that is, to transition to the default context) before executing the method. It returns to the original nondefault context after the call to the method completes.

  This can be useful when the context-bound class has . In that case, all calls to members of the class are automatically synchronized, and the synchronization domain is the entire body of code for the class. If code in the call stack of a member calls the method and specifies true for , the thread exits the synchronization domain, allowing a thread that is blocked on a call to any member of the object to proceed. When the method returns, the thread that made the call must wait to reenter the synchronization domain.

  Waits for all the elements in the specified array to receive a signal, using a value to specify the time interval, and specifying whether to exit the synchronization domain before the wait.

  true when every element in has received a signal; otherwise false.

  A WaitHandle array containing the objects for which the current instance will wait. This array cannot contain multiple references to the same object. A that represents the number of milliseconds to wait, or a that represents -1 milliseconds, to wait indefinitely. true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it afterward; otherwise, false.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)
  System.Int32 `` is or one or more elements in the array is . contains elements that are duplicates. The number of objects in is greater than the system permits.

  is new in the .NET Framework version 2.0. In previous versions, the method returns true if the wait completes because a mutex is abandoned. An abandoned mutex often indicates a serious coding error. In the case of a system-wide mutex, it might indicate that an application has been terminated abruptly (for example, by using Windows Task Manager). The exception contains information useful for debugging.

  The method throws an only when the wait completes because of an abandoned mutex. If contains a released mutex with a lower index number than the abandoned mutex, the method completes normally and the exception is not thrown.

  In versions of the .NET Framework earlier than version 2.0, if a thread exits or aborts without explicitly releasing a , and that Mutex is at index 0 (zero) in a WaitAny array on another thread, the index returned by WaitAny is 128 instead of 0.

  This method returns when any handle is signaled. If more than one object becomes signaled during the call, the return value is the array index of the signaled object with the smallest index value of all the signaled objects. On some implementations, if more that 64 handles are passed, a is thrown.

  Calling this method overload is equivalent to calling the method overload and specifying -1 (or ) for and true for .

  Waits for any of the elements in the specified array to receive a signal.

  The array index of the object that satisfied the wait.

  A WaitHandle array containing the objects for which the current instance will wait. 0
- Method
  2.0.0.0
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)
  System.Int32 `` ``

  If is zero, the method does not block. It tests the state of the wait handles and returns immediately.

  The method throws an only when the wait completes because of an abandoned mutex. If contains a released mutex with a lower index number than the abandoned mutex, the method completes normally and the exception is not thrown.

  This method returns when the wait terminates, either when any of the handles are signaled or when a timeout occurs. If more than one object becomes signaled during the call, the return value is the array index of the signaled object with the smallest index value of all the signaled objects. On some implementations, if more that 64 handles are passed, a is thrown.

  Calling this method overload is the same as calling the overload and specifying false for .

  Waits for any of the elements in the specified array to receive a signal, using a 32-bit signed integer to specify the time interval.

  The array index of the object that satisfied the wait, or if no object satisfied the wait and a time interval equivalent to has passed.

  A WaitHandle array containing the objects for which the current instance will wait. The number of milliseconds to wait, or (-1) to wait indefinitely.
- Method
  2.0.0.0
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)
  System.Int32 `` ``

  If is zero, the method does not block. It tests the state of the wait handles and returns immediately.

  The method throws an only when the wait completes because of an abandoned mutex. If contains a released mutex with a lower index number than the abandoned mutex, the method completes normally and the exception is not thrown.

  This method returns when the wait terminates, either when any of the handles are signaled or when a time-out occurs. If more than one object becomes signaled during the call, the return value is the array index of the signaled object with the smallest index value of all the signaled objects. On some implementations, if more that 64 handles are passed, a is thrown.

  The maximum value for is .

  Calling this method overload is the same as calling the overload and specifying false for .

  Waits for any of the elements in the specified array to receive a signal, using a to specify the time interval.

  The array index of the object that satisfied the wait, or if no object satisfied the wait and a time interval equivalent to has passed.

  A WaitHandle array containing the objects for which the current instance will wait. A that represents the number of milliseconds to wait, or a that represents -1 milliseconds to wait indefinitely.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)
  System.Int32 `` `` ``

  If is zero, the method does not block. It tests the state of the wait handles and returns immediately.

  is new in the .NET Framework version 2.0. In previous versions, the method returns true if the wait completes because a mutex is abandoned. An abandoned mutex often indicates a serious coding error. In the case of a system-wide mutex, it might indicate that an application has been terminated abruptly (for example, by using Windows Task Manager). The exception contains information useful for debugging.

  The method throws an only when the wait completes because of an abandoned mutex. If contains a released mutex with a lower index number than the abandoned mutex, the method completes normally and the exception is not thrown.

  In versions of the .NET Framework earlier than version 2.0, if a thread exits or aborts without explicitly releasing a , and that Mutex is at index 0 (zero) in a WaitAny array on another thread, the index returned by WaitAny is 128 instead of 0.

  This method returns when the wait terminates, either when any of the handles are signaled or when a timeout occurs. If more than one object becomes signaled during the call, the return value is the array index of the signaled object with the smallest index value of all the signaled objects. On some implementations, if more that 64 handles are passed, a is thrown.

  ## Notes on Exiting the Context

  The parameter has no effect unless the method is called from inside a nondefault managed context. This can happen if your thread is inside a call to an instance of a class derived from . Even if you are currently executing a method on a class that does not derive from , like , you can be in a nondefault context if a is on your stack in the current application domain.

  When your code is executing in a nondefault context, specifying true for causes the thread to exit the nondefault managed context (that is, to transition to the default context) before executing the method. The thread returns to the original nondefault context after the call to the method completes.

  This can be useful when the context-bound class has . In that case, all calls to members of the class are automatically synchronized, and the synchronization domain is the entire body of code for the class. If code in the call stack of a member calls the method and specifies true for , the thread exits the synchronization domain, allowing a thread that is blocked on a call to any member of the object to proceed. When the method returns, the thread that made the call must wait to reenter the synchronization domain.

  Waits for any of the elements in the specified array to receive a signal, using a 32-bit signed integer to specify the time interval, and specifying whether to exit the synchronization domain before the wait.

  The array index of the object that satisfied the wait, or if no object satisfied the wait and a time interval equivalent to has passed.

  A WaitHandle array containing the objects for which the current instance will wait. The number of milliseconds to wait, or (-1) to wait indefinitely. true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it afterward; otherwise, false.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)
  System.Int32 `` `` ``

  If is zero, the method does not block. It tests the state of the wait handles and returns immediately.

  is new in the .NET Framework version 2.0. In previous versions, the method returns true if the wait completes because a mutex is abandoned. An abandoned mutex often indicates a serious coding error. In the case of a system-wide mutex, it might indicate that an application has been terminated abruptly (for example, by using Windows Task Manager). The exception contains information useful for debugging.

  The method throws an only when the wait completes because of an abandoned mutex. If contains a released mutex with a lower index number than the abandoned mutex, the method completes normally and the exception is not thrown.

  In versions of the .NET Framework earlier than version 2.0, if a thread exits or aborts without explicitly releasing a , and that Mutex is at index 0 (zero) in a WaitAny array on another thread, the index returned by WaitAny is 128 instead of 0.

  This method returns when the wait terminates, either when any of the handles are signaled or when a time-out occurs. If more than one object becomes signaled during the call, the return value is the array index of the signaled object with the smallest index value of all the signaled objects. On some implementations, if more that 64 handles are passed, a is thrown.

  The maximum value for is .

  ## Notes on Exiting the Context

  The parameter has no effect unless the method is called from inside a nondefault managed context. This can happen if your thread is inside a call to an instance of a class derived from . Even if you are currently executing a method on a class that does not derive from , like , you can be in a nondefault context if a is on your stack in the current application domain.

  When your code is executing in a nondefault context, specifying true for causes the thread to exit the nondefault managed context (that is, to transition to the default context) before executing the method. The thread returns to the original nondefault context after the call to the method completes.

  This can be useful when the context-bound class has . In that case, all calls to members of the class are automatically synchronized, and the synchronization domain is the entire body of code for the class. If code in the call stack of a member calls the method and specifies true for , the thread exits the synchronization domain, allowing a thread that is blocked on a call to any member of the object to proceed. When the method returns, the thread that made the call must wait to reenter the synchronization domain.

  Waits for any of the elements in the specified array to receive a signal, using a to specify the time interval and specifying whether to exit the synchronization domain before the wait.

  The array index of the object that satisfied the wait, or if no object satisfied the wait and a time interval equivalent to has passed.

  A WaitHandle array containing the objects for which the current instance will wait. A that represents the number of milliseconds to wait, or a that represents -1 milliseconds to wait indefinitely. true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it afterward; otherwise, false.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean The current instance has already been disposed.

  is new in the .NET Framework version 2.0. In previous versions, the method returns true when a mutex is abandoned. An abandoned mutex often indicates a serious coding error. In the case of a system-wide mutex, it might indicate that an application has been terminated abruptly (for example, by using Windows Task Manager). The exception contains information useful for debugging.

  The caller of this method blocks indefinitely until the current instance receives a signal. Use this method to block until a receives a signal from another thread, such as is generated when an asynchronous operation completes. For more information, see the interface.

  Calling this method overload is equivalent to calling the method overload and specifying -1 or for the first parameter and false for the second parameter.

  Override this method to customize the behavior of derived classes.

  Blocks the current thread until the current receives a signal.

  true if the current instance receives a signal. If the current instance is never signaled, never returns.

  0
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean ``

  If is zero, the method does not block. It tests the state of the wait handle and returns immediately.

  The caller of this method blocks until the current instance receives a signal or a time-out occurs. Use this method to block until a receives a signal from another thread, such as is generated when an asynchronous operation completes. For more information, see the interface.

  Override this method to customize the behavior of derived classes.

  Calling this method overload is the same as calling the overload and specifying false for .

  Blocks the current thread until the current receives a signal, using a 32-bit signed integer to specify the time interval.

  true if the current instance receives a signal; otherwise, false.

  The number of milliseconds to wait, or (-1) to wait indefinitely.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean ``

  If is zero, the method does not block. It tests the state of the wait handle and returns immediately.

  The caller of this method blocks until the current instance receives a signal or a time-out occurs. Use this method to block until a receives a signal from another thread, such as is generated when an asynchronous operation completes. For more information, see the interface.

  Override this method to customize the behavior of derived classes.

  The maximum value for is .

  Calling this method overload is the same as calling the overload and specifying false for .

  Blocks the current thread until the current instance receives a signal, using a to specify the time interval.

  true if the current instance receives a signal; otherwise, false.

  A that represents the number of milliseconds to wait, or a that represents -1 milliseconds to wait indefinitely.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean `` ``

  If is zero, the method does not block. It tests the state of the wait handle and returns immediately.

  is new in the .NET Framework version 2.0. In previous versions, the method returns true when a mutex is abandoned. An abandoned mutex often indicates a serious coding error. In the case of a system-wide mutex, it might indicate that an application has been terminated abruptly (for example, by using Windows Task Manager). The exception contains information useful for debugging.

  The caller of this method blocks until the current instance receives a signal or a time-out occurs. Use this method to block until a receives a signal from another thread, such as is generated when an asynchronous operation completes. For more information, see the interface.

  Override this method to customize the behavior of derived classes.

  ## Notes on Exiting the Context

  The parameter has no effect unless the method is called from inside a nondefault managed context. This can happen if your thread is inside a call to an instance of a class derived from . Even if you are currently executing a method on a class that does not derive from , like , you can be in a nondefault context if a is on your stack in the current application domain.

  When your code is executing in a nondefault context, specifying true for causes the thread to exit the nondefault managed context (that is, to transition to the default context) before executing the method. The thread returns to the original nondefault context after the call to the method completes.

  This can be useful when the context-bound class has . In that case, all calls to members of the class are automatically synchronized, and the synchronization domain is the entire body of code for the class. If code in the call stack of a member calls the method and specifies true for , the thread exits the synchronization domain, allowing a thread that is blocked on a call to any member of the object to proceed. When the method returns, the thread that made the call must wait to reenter the synchronization domain.

  Blocks the current thread until the current receives a signal, using a 32-bit signed integer to specify the time interval and specifying whether to exit the synchronization domain before the wait.

  true if the current instance receives a signal; otherwise, false.

  The number of milliseconds to wait, or (-1) to wait indefinitely. true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it afterward; otherwise, false.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean `` ``

  If is zero, the method does not block. It tests the state of the wait handle and returns immediately.

  is new in the .NET Framework version 2.0. In previous versions, the method returns true when a mutex is abandoned. An abandoned mutex often indicates a serious coding error. In the case of a system-wide mutex, it might indicate that an application has been terminated abruptly (for example, by using Windows Task Manager). The exception contains information useful for debugging.

  The caller of this method blocks until the current instance receives a signal or a time-out occurs. Use this method to block until a receives a signal from another thread, such as is generated when an asynchronous operation completes. For more information, see the interface.

  Override this method to customize the behavior of derived classes.

  The maximum value for is .

  ## Notes on Exiting the Context

  The parameter has no effect unless the method is called from inside a nondefault managed context. This can happen if your thread is inside a call to an instance of a class derived from . Even if you are currently executing a method on a class that does not derive from , like , you can be in a nondefault context if a is on your stack in the current application domain.

  When your code is executing in a nondefault context, specifying true for causes the thread to exit the nondefault managed context (that is, to transition to the default context) before executing the method. The thread returns to the original nondefault context after the call to the method completes.

  This can be useful when the context-bound class has . In that case, all calls to members of the class are automatically synchronized, and the synchronization domain is the entire body of code for the class. If code in the call stack of a member calls the method and specifies true for , the thread exits the synchronization domain, allowing a thread that is blocked on a call to any member of the object to proceed. When the method returns, the thread that made the call must wait to reenter the synchronization domain.

  Blocks the current thread until the current instance receives a signal, using a to specify the time interval and specifying whether to exit the synchronization domain before the wait.

  true if the current instance receives a signal; otherwise, false.

  A that represents the number of milliseconds to wait, or a that represents -1 milliseconds to wait indefinitely. true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it afterward; otherwise, false.
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32 258

  This field is one of the possible return values of WaitAny.

  Indicates that a operation timed out before any of the wait handles were signaled. This field is constant.

0