what is object lock?

Answer Posted / divikiran

The lock keyword marks a statement block as a critical section by obtaining the mutual-exclusion lock for a given object, executing a statement, and then releasing the lock. This statement takes the following form:

Object thisLock = new Object();
lock (thisLock)
{
// Critical code section
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to prepare parametrized (with more than one parameters) crystal report.pls tell me the code procedure, if any body can?

547


Is .net front end or backend?

595


Does .net supports destructors concept?

1631


Is .net an object oriented language? What are their components?

537


What do you mean by web service?

660






How to implement datagrid in.net? How would you make a combo-box appear in one column of a datagrid? What are the ways to show data grid inside a data grid for a master details type of tables? If we write any code for datagrid methods. What is the access specifier used for that methods in the code behind file and why?

557


What is jit compilers?

587


Explain what is reflection in microsoft .net context?

570


Please explain what is the difference between odbc and ado?

539


What is heap and what is stack?

589


Explain can 2 different applications use the same dll in gac at the same time?

589


Tell me what is serialization?

571


What does msil do?

567


i m fresher,hav SQL knowledge but in my ofc. i hav to work on dotnet. so plz tell me how to learn it,? from where to stat? i hav C prog. knowledge, ASP.net

2148


What is 3 tier architecture?

588