I want to write something to a text file.
But want to make sure that the text file is NOT in use by any other process.
Problem is my application has to write something to a text file after completion of writting by some other process which I don't have any control.
So first before accessing particular text file I want to check whether it is in use by any other process or not.
How to do this in C#?