错误:System.IO.IOException:“The process cannot access the file 'xxx1.txt' because it is being used by another process.”
解决:
FileStream fileStream = new FileStream(fileName, FileMode.Open,FileAccess.Read,FileShare.ReadWrite);
FileShare.ReadWrite需要加上共享去读写的权限