How to read a wordfile in multiple reader

Posted by Kirubakaranb.Tech under C# on 10/17/2012 | Points: 10 | Views : 969 | Status : [Member] | Replies : 1
how to read a single wordfile into multiple reader withour read and write lock to that read file.
In my program i browse one wordfile and open that wordfile into richtextbox. In that same file read a another person to open that file and read that file into richtextbox.
If suppose multiple reader to read that file means we have readonly problem that is for deadlock condtion occure. How to read without read and write lock condion by using threading concept.
give me solution for that pbm.....


Posted by: Sheonarayan on: 10/17/2012 [Administrator] HonoraryPlatinum | Points: 25

Not sure how you are reading the file, if you are using FileStream, you can use FileShare mode something like below.

FileStream fs = new FileStream("your file name", FileMode.Open, FileAccess.Read, System.IO.FileShare.Read)


Sheo Narayan

Kirubakaranb.Tech, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response