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 boxing and unboxing in c#?
Compare and contrast between the System.Array.CopyTo() and Clone()?
What are reflections in c#?
What is querystring in c#?
What is a property in c#?
Is c# a keyword?
Is java better than c#?
Define collections?
What are the fundamental differences between value types and reference types?
Explain metadata in c#.
What are the advantages of generics in c#?
Why would you use untrusted verification?
Is c# 8 released?
Explain how can I get around scope problems in a try/catch?
What’s a strong name?