C
curt.bathras
I am trying to open and read a file using the following:
BufferedStream stream = new BufferedStream(File.OpenRead(aFilename));
If the file specified by aFilename is being used by another
application, an IOException is thrown with the message: "The process
cannot access the file because it is being used by another process." I
figured since I opened the file for read only using File.OpenRead, I
would be fine... but no such luck.
The odd thing is I can open the file specified by aFilename in Notepad
with no problems. Any help would be greatly appreciated!!
Thanks,
Curt
BufferedStream stream = new BufferedStream(File.OpenRead(aFilename));
If the file specified by aFilename is being used by another
application, an IOException is thrown with the message: "The process
cannot access the file because it is being used by another process." I
figured since I opened the file for read only using File.OpenRead, I
would be fine... but no such luck.
The odd thing is I can open the file specified by aFilename in Notepad
with no problems. Any help would be greatly appreciated!!
Thanks,
Curt