Answers for "c# read file while writing"

C#
0

c# read file while writing

using (var fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
using (var sr = new StreamReader(fs, Encoding.Default)) {
    // read the stream
    //...
}
Posted by: Guest on August-23-2021

C# Answers by Framework

Browse Popular Code Answers by Language