To sum up, we use code to monitor and control file for type of txt.
then I have a question: the code always throw exception,details as follows
System.OutOfMemoryException: the specified buffer size is too large,FileSystemWatcher Unable to allocate 8192 bytes internal buffer,
in System.IO.FileSystemWatcher.Monitor(IntPtr bufferPtr)
in System.IO.FileSystemWatcher.StartRaisingEvents()
in System.IO.FileSystemWatcher.set_EnableRaisingEvents(Boolean value)