case WatcherChangeTypes.Changed: Console.WriteLine(string.Format("File {0} has been modified\r\n", e.FullPath)); using (FileStream fs = new FileStream(e.FullPath, FileMode.Open, FileAccess.Read, FileShare.Read)) { using (StreamReader sr = new StreamReader(fs)) { string line; while ((line = sr.ReadLine()) != null) { if (sr.EndOfStream) { Console.WriteLine(line); } } sr.Close(); } fs.Close(); } break;
FileShare
ReadWrite
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)