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
How is a managed code executed?
What is the lapsed listener problem?
What are .net functions?
When we use windows api in .net is it managed or unmanaged code?
How do we access crystal reports in .net?
How to load a user control dynamically in runtime?
Can I write il programs directly?
Explain webfarm vs webgardens in .net?
Which dll is required to translate xml to sql in internet information server (iis)?
What tools is used to develop .NET applications?
Explain memory-mapped files.
Do you know the difference between the stack and the heap?
Using activex control in .net?
Explain when should you use .net web forms over asp.net mvc?
What is strong-typing versus weak-typing? Which is preferred?