0

I use a stream reader to read a file. Another program writes interval-white to this file using streamwriter.

Sometimes it happens, that the following error is displayed:

"The process cannot access the file, because it is used by another process".

I know why, but is there a way to check in C# if this file is being used by another process, so that it doesn't crash. I'm connected to the streamreader / streamwriter.

Thanks for any help.

ArnoD
  • 9
  • 1

0 Answers0