Creating a Shared Lock

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Is there a way to create a shared lock using the Monitor class or any other
synchronization class in .NET?

So I have one resource that may have multiple threads using it at once but a
second thread that when called must have exclusive access and cause the
other threads to wait.

I can't figure out how to do this with .Net.

Thanks.


.