Answers for "file watcher in c#.net example"

C#
0

how to use file watcher in c#

private void watch()
{
  FileSystemWatcher watcher = new FileSystemWatcher();
  watcher.Path = path;
  watcher.NotifyFilter = NotifyFilters.LastWrite;
  watcher.Filter = "*.*";
  watcher.Changed += new FileSystemEventHandler(OnChanged);
  watcher.EnableRaisingEvents = true;
}
Posted by: Guest on November-13-2020

C# Answers by Framework

Browse Popular Code Answers by Language