Jango
Jango

Reputation: 5545

How to get process ID and deal with it using c#?

If one file is used by other process and you are trying to manipulate with it...it gives an error:-

The process cannot access the file 'abc.txt' because it is being used by another process.

In C#, How can i come to know that 'abc.txt' file is used by the process Name "XYZ.exe" (or any other process)?

Upvotes: 1

Views: 1027

Answers (1)

CrimsonX
CrimsonX

Reputation: 9238

I did a quick search and think these posts can be helpful to you:

Similar Question

C# Answer#1

C# Answer #2

Upvotes: 1

Related Questions