C# monitor

C# Lock Vs Monitor – Why Use Monitor instead of Lock

Answer: Lock Vs Monitor in C# multithreading: Difference between monitor and lock in C# is that lock internally wraps the Enter and Exit methods in a try…finally block with exception handling. Whereas for Monitor class in C#, we use try and finally block explicitly to release lock properly. Lock = Monitor + try finally. Below […]

Scroll to top