Method1()
{
int a=0, b=0, c=0;
Monitor.Enter(this)
c = 12;
b = 3;
a = c/b
Moniter.Exit(this)
}
Method1()
{
int a=0, b=0, c=0;
c = 12;
b = 3;
lock(this){
a = c/b
}
}
Choose correct answer.
a. Upon completion, Method1 and Method2 release the lock
b. Upon Comletion, Method1 release the lcok and Method2 not.
c. Upon Completion, Method2 release the lock and Method1
not.
d. Upon Completion, neither Method1 or Method to release
the lock.
Answer Posted / gautam
b
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is c# commonly used for?
You are designing a user control. You created new property called backgroundimage which is of type image. You wanted to disable storing this property in the user’s form. How to achieve this?
What is a console application in c#?
What is the role of the datareader class in ado.net connections?
What is the difference between a constant and a static readonly field?
What is the purpose of escape sequence?
Is c# queue thread safe?
What are the 3 different types of arrays?
What is addressof operator?
What are the Types of configuration files and their differences
What is the advantage of singleton class?
What does out mean in c#?
What is a deadlock lock?
How to reduce image resolution in C#?
How does foreach loop work in c#?