Does FileShare.None make threads wait until the filestream is closed?
问题 When using a file stream, and setting FileShare to None , and say two users accessing the same function at the same time want to read/write to that file. Will FileShare.None make the second users request waiting or will the second user's request throw an exception? //two users get to this this code at the same time using (FileStream filestream = new FileStream(chosenFile, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None)) using (StreamReader sr = new StreamReader(filestream)) using