0

I am working on a MVC project. I have three roles Developer, Administrator & Employee. I have many users in each role. I have three folders(named Developer, Administrator & Employee) in server for each role. When user click on a specific Button, I need to write(append log if file exist already) a small log to a single file to the specific folder according his role. So if A and B are two users of role Developer, they click the button at the same time I need to give synchronous access to the Developer folder for user A and B. So resource here is not single & Specific users need to synchronous access to specific folder. How can I use Lock for this scenario?

I sometimes find Static Lock declaration. What is the difference between the following two lines of code

     private static readonly object Locker = new object();
     private readonly object Locker = new object();

Please let me know how it is possible?

thanks

user3352074
  • 145
  • 3
  • 14
  • Possible duplicate: [Difference between static and non static members](https://stackoverflow.com/questions/13155474/difference-between-static-and-non-static-members/13155611). – Dmytro Mukalov Sep 26 '19 at 16:35
  • Static and no static are not my only question.Please read – user3352074 Sep 27 '19 at 08:12
  • I don't see any other specific questions in your topic - other questions are too broad and subjective. Please read [What types of questions should I avoid asking](https://stackoverflow.com/help/dont-ask). So please edit your post in order to articulate your problem more precisely. – Dmytro Mukalov Sep 27 '19 at 12:00

0 Answers0