you can use the System.IO.FileSystemWatcher class.
FileSystemWatcher watcher = = new FileSystemWatcher();
watcher.Filter = @"myFile.ini";
watcher.Changed += new FileSystemEventHandler(watcher_Changed);
and then you implement the delegate of type FileSystemEventHandler:
static void watcher_Changed(object sender, FileSystemArgs e)
{
Console.WriteLine("File {0} has changed.", e.FullPath );
}
every time the file you have selected in the filter is modified, you get an alert (you can use both a Debug class or Trace class to output data).
Moreover the FileSystemWatcher class has more events (Renamed, Deleted, Created).