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
Is the COM architecture same as .Net architecture? What is the difference between them (if at all there is)?
How viewstate is being formed and how it is stored on client in .net?
What are the advantages of .net?
Explain what does managed mean in the .net context?
What is the single responsibility principle?
Tell us the difference between managed and unmanaged code?
What is difference between system.string and system.stringbuilder classes?
What is delegation in .net?
Conceptually, what is the difference between early-binding and late-binding?
Explain about .Net products?
What is different between webusercontrol and in webcustomcontrol?
What is the use of system.diagnostics.process class in .net?
What is the difference between a debug and release build?
What is equivalent for regsvr32 exe in .net ?
How does the generational garbage collector in the .net clr manage object lifetime? What is non-deterministic finalization?