Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

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
    //...
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #read #file #writing
ADD COMMENT
Topic
Name
2+9 =