iwdu15 wrote:
> hi...just a quick question. what are the differences in using a FileStream
> and StreamWriter opposed to just a StreamWriter.....for instance
Not sure about the Writer, but a notable difference with the
StreamReader that you might want to bear in mind.
sr = New StreamReader( "file" )
takes a /lock/ on the target file. processes attempting to append data
to the file will be blocked from doing so.
fs = New FileStream( "file", ... )
sr = New StreamReader( fs )
on the other hand, does not, allowing other processes to write to the
file unhindered.
HTH,
Phill W.
|