Export (0) Print
Expand All

DispatcherSynchronizationContext.Wait Method

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

Namespace: System.Windows.Threading
Assembly: WindowsBase (in windowsbase.dll)

public override int Wait (
	IntPtr[] waitHandles,
	bool waitAll,
	int millisecondsTimeout
public int Wait (
	IntPtr[] waitHandles, 
	boolean waitAll, 
	int millisecondsTimeout
public override function Wait (
	waitHandles : IntPtr[], 
	waitAll : boolean, 
	millisecondsTimeout : int
) : int
You cannot use methods in XAML.



An array that contains the native operating system handles.


true to wait for all handles; false to wait for any handle.


The number of milliseconds to wait, or Infinite (-1) to wait indefinitely.

Return Value

The array index of the object that satisfied the wait.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

© 2015 Microsoft