File being used by another process after using File.Create()

Posted by Brett on Stack Overflow See other posts from Stack Overflow or by Brett
Published on 2010-05-06T13:15:50Z Indexed on 2010/05/06 13:18 UTC
Read the original article Hit count: 198

Filed under:
|
|

Hi All,

I'm trying to detect if a file exists at runtime, if not, create it. However I'm getting a 'The process cannot access the file 'myfile.ext' because it is being used by another process.' error when I try to write to it.

Any ideas how to fix it?

Thanks

© Stack Overflow or respective owner

Related posts about c#

Related posts about beginner