I have text file which is being been used by modscan to write data into the file. At a particular time I have to read the data and save in database. In offline mode ie; without modscan using it I can read the data and very well save in database. however as it online with modscan it gives exception
Cannot access file as it been used by other process.
My code:
using System.IO;
string path = dt.Rows[i][11].ToString();
string[] lines = System.IO.File.ReadAllLines(@path);
path has "E:\Metertxt\02.txt"
So what changes I need to make in order to read it without interfering with modscan. I googled and I found this which might work, however I am not sure how to use it
FileShare.ReadWrite