I\'m getting an exception: The process cannot access the file.
Here\'s the code:
if (!Monitor.TryEnter(lockObject)) return; try { watcher.Ena
In your try block you have opened the file. You need to close it.
XmlDocument xdoc = new XmlDocument(); xdoc.Load(FileName);
Follow this example.
http://msdn.microsoft.com/en-us/library/zcsyk915.aspx