What is the lock statement in C#?

C# Programming Language >   OOPS Concept >   Introduction to OOP Concept  

Short Question

581


Answer:

Lock statement is used to ensure that one thread doesn't enter a critical section of code while another thread is in the critical section. If another thread attempts to enter a locked code it will wait, block, until the object is released.


This Particular section is dedicated to Question & Answer only. If you want learn more about C# Programming Language. Then you can visit below links to get more depth on this subject.




Join Our telegram group to ask Questions

Click below button to join our groups.