Use the
FileStream class's Open method to open a file with
FileShare.ReadWrite as a parameter. Then use
StreamReader class supplying the
FileStream object as a constructor argument:
FileStream fs = File.Open(filename, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
StreamReader sr = new StreamReader(fs);
No comments:
Post a Comment