I want to be able to read .log files, I can specify the type of file to be returned but it breaks and can't open the file even though it contains plain text! Why is this?
Loading
I want to be able to read .log files, I can specify the type of file to be returned but it breaks and can't open the file even though it contains plain text! Why is this?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
AlanPosted Jun 15, 2007, 10:24 AM
Drew TaylorPosted Jun 15, 2007, 8:12 AM
Yes I saw the error message, what about when the user clicks the button it makes a copy of the log file and then reads that one? And then I could have another button called refresh which copys and opens the copied file again?
AlanPosted Jun 15, 2007, 6:29 AM
If the .log file is currently in use by your application, or by some other process, then it'll need to be closed first before it can be reopened and read via a StreamReader.