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 lock in c#?
Explain nullable types in c#?
What is string [] args in c#?
Is char * null terminated?
What is lazy loading c#?
What is the use of static in c#?
Is datetime a value type in c#?
What is a static field?
What does assert() do in c#?
Can we have multiple constructors in a class c#?
What do you mean by string objects are immutable?
How much time will it take to learn unity?
From a versioning perspective, what are the drawbacks of extending an interface as opposed to extending a class?
How many types of serialization are there in c#?
Is array value type in c#?