This topic has not yet been rated - Rate this topic

FileSystemWatcher.WaitForChanged Method (WatcherChangeTypes, Int32)

.NET Framework 1.1

A synchronous method that returns a structure that contains specific information on the change that occurred, given the type of change you want to monitor and the time (in milliseconds) to wait before timing out.

[Visual Basic]
Overloads Public Function WaitForChanged( _
   ByVal changeType As WatcherChangeTypes, _
   ByVal timeout As Integer _
) As WaitForChangedResult
[C#]
public WaitForChangedResult WaitForChanged(
 WatcherChangeTypes changeType,
 int timeout
);
[C++]
public: WaitForChangedResult WaitForChanged(
 WatcherChangeTypes changeType,
 int timeout
);
[JScript]
public function WaitForChanged(
   changeType : WatcherChangeTypes,
 timeout : int
) : WaitForChangedResult;

Parameters

changeType
The WatcherChangeTypes to watch for.
timeout
The time (in milliseconds) to wait before timing out.

Return Value

A WaitForChangedResult that contains specific information on the change that occurred.

Remarks

This method waits until a change occurs or it has timed out. A value of -1 for the timeout parameter means wait indefinitely.

Requirements

Platforms: Windows NT Server 4.0, Windows NT Workstation 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

FileSystemWatcher Class | FileSystemWatcher Members | System.IO Namespace | FileSystemWatcher.WaitForChanged Overload List | WaitForChangedResult

Did you find this helpful?
(1500 characters remaining)