T
Tom
I am working with the this object as oppose to the
StreamReader object becuase I need to access a file (to
find the contents) while an external application is
updating the file. When I was working with the
StreamReader object I got a deadlock when I tried reading
the file while my external application was writing to it.
So far I am able to create a FileStream object and open
the file in question (CrawlerBackup.txt).
But I am unable to write code that will read the contents
because I don't understand the syntax for the overloaded
methods.
FileStream objFileStream = new FileStream
(FILENAME,FileMode.Open);
bjFileStream = File.Open(CopyToFileName,FileMode.Open,
FileAccess.Read,FileShare.Read);
Can someone help me read the file contents?
BeginRead has two overloaded methods both require a Byte[]
buffer as its first argument. What do I put in this
parameter? I wish to read the contents not pass in a
Byte array?
StreamReader object becuase I need to access a file (to
find the contents) while an external application is
updating the file. When I was working with the
StreamReader object I got a deadlock when I tried reading
the file while my external application was writing to it.
So far I am able to create a FileStream object and open
the file in question (CrawlerBackup.txt).
But I am unable to write code that will read the contents
because I don't understand the syntax for the overloaded
methods.
FileStream objFileStream = new FileStream
(FILENAME,FileMode.Open);
bjFileStream = File.Open(CopyToFileName,FileMode.Open,
FileAccess.Read,FileShare.Read);
Can someone help me read the file contents?
BeginRead has two overloaded methods both require a Byte[]
buffer as its first argument. What do I put in this
parameter? I wish to read the contents not pass in a
Byte array?