Error!
Success!

C# how to open a file that is locked by another process

0
kicks

C# how to open a file that is locked by another process  (Unpublished)

If the file is locked by the process exclusively, it is not possible to open those files. But if the process holds only shared lock, we can open the file using c# using the following code, FileStream objf = new FileStream(”Ouput.xls”, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); Excel hold the shared lock on the files. The Following is an example program to read a file,


Kicked By:
Drop Kicked By: