Hi,
Use a FileStream and decorate it with a StreamReader:
FileStream fs = new FileStream( file , FileMode.Open, FileAccess.Read )
StreamReader reader = new StreamReader( fs)
it may solve your problem.
cheers,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Pujo Aji" <aj****@yahoo.com> wrote in message
news:opskjksqnvd3sg8l@ajinote...
Hi,
I think the third party vendor give the access, since I can open using
notepad and see the difference every 1 second.
I use this code before:
string sLN;
try {
using (TextReader tr = new StreamReader(FN)) {
sLN = tr.ReadLine();
while (sLN != null) {
//show in console
sLN = tr.ReadLine();
}
tr.Close();
}
}
catch {
//give some info;
}
How can I use the FileStream, FileShare parameter?
Sincerely Yours,
Pujo Aji
On Thu, 13 Jan 2005 13:37:42 +0100, Marcin Grzebski
<mg*******@taxussi.spamstop.com.spamstop.pl> wrote:
Hi,
FileStream constructor has a FileShare parameter.
I believe that setting it to "ReadWrite" allow you to
access read/write operation.
But there can be problem if "third party vendor" doesn't
allow to share that file.
HTH
Marcin
Hello,
I would like to read file during runtime(the other third party vendor
write the program and my program read it every second). I can't do it
until the third party vendor stop writing it. anyone can help?
Sincerely Yours,
Pujo
--
Using Opera's revolutionary e-mail client:
http://www.opera.com/m2/