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
What are the main components in .net?
Tell about your technical profile ?
What are multicast delegates?
Explain what is heap and what is stack?
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?
Why is .net used?
Explain the difference between the while and for loop. Provide a .net syntax for both loops?
Explain what is an anonymous method and how is it different from a lambda expression?
What is common language specification (cls)?
What is the single responsibility principle?
State some of the different languages supported by .net?
How big is the datatype int in .net?
Difference between machine.config and web.config?
what is prototype design pattern in .net
Interop Services?