Hi Daniel,
Strema reader uses new FileStream(path, FileMode.Open, FileAccess.Read,
FileShare.Read) if you don't pass the already stream in the constructor.
You might pass a valid stream object in the constructor of StreamReader if
you feel like opening the file differently.
And, don't forget to close it.
--
Miha Markic - RightHand .NET consulting & development
miha at rthand com
"Daniel P." <da******@hotmail.comU> wrote in message
news:ue**************@TK2MSFTNGP10.phx.gbl...
I'm using StreamReader to read a text file and sometimes I get an error
saying that the file is opened by someone else.
I haven't found any info about how to set a flag to tell StreamReader to
open the file in shared mode and read mode.
Thanks!
Daniel