TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Athian Miere
NA
5
0
how do i read a file open in another program?
Dec 17 2005 8:25 AM
I'm trying to read from a *txt file that a program uses as a log. I haven't found any good articles on reading from logs using C#. so i created a streamreader object and i have it read from the log.txt
well, i want to read from the log while it's being updated by another program, so i have a file systemwatcher that triggers a change event, and that event tells the streamreader to go look at the file. but I keep getting an error from the streamreader that it can't access the file since it is open by another program.
what am i doing wrong? is the streamreader the wrong object to use?
Reply
Answers (
1
)
Windows services
WebBrowser control