C# How to to tell what process is using a file?

Posted by JL on Stack Overflow See other posts from Stack Overflow or by JL
Published on 2010-03-23T04:09:37Z Indexed on 2010/03/23 4:11 UTC
Read the original article Hit count: 389

Filed under:

I am getting a pretty common, "The process cannot access the file because it is being used by another process."

Now I am nearly certain that the only process accessing this file is from code that I have written and I've been careful to use a using statement around accessing it.

But to be 100% sure, is there anyway to check this programatically when this error occurs?

© Stack Overflow or respective owner

Related posts about c#