top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is the use of Monitor in C#?

0 votes
343 views
What is the use of Monitor in C#?
posted May 15, 2017 by Rohini Agarwal

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Monitor and lock is the way to provide thread safety in a multithreaded application in C#. Both provide a mechanism to ensure that only one thread is executing code at the same time to avoid any functional breaking of code. Lock is the keyword in C# that will ensure one thread is executing a piece of code at one time.

answer May 17, 2017 by Shweta Singh
...