FileSystemWatcher.WaitForChanged Method (WatcherChangeTypes, Int32)
Assembly: System (in system.dll)
public WaitForChangedResult WaitForChanged ( WatcherChangeTypes changeType, int timeout )
public function WaitForChanged ( changeType : WatcherChangeTypes, timeout : int ) : WaitForChangedResult
The WatcherChangeTypes to watch for.
The time (in milliseconds) to wait before timing out.
Return ValueA WaitForChangedResult that contains specific information on the change that occurred.
This method waits until a change occurs or it has timed out. A value of -1 for the timeout parameter means wait indefinitely.
This method allows an event handler to be invoked to respond to file changes even if the EnableRaisingEvents property is set to false.
In some systems, FileSystemWatcher reports changes to files using the short 8.3 file name format. For example, a change to "LongFileName.LongExtension" could be reported as "LongFi~.Lon".