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
Why data types are important?
What are the advantages of using partial classes?
What is the difference between constants and read-only?
How to find Percentage, name ,College from a resume or document ? How to export these values to other page in C#?
What is a trace and asset? Explain some differences?
What is the difference between ref & out parameters in c#?
Tell me the difference between value passing and address passing?
Is type nullable c#?
What is sqladapter c#?
What is the difference between static and constant variables?
What is the usage of OLE?
What is a partial class. Give an example?
How do I open the console window?
What is unrecognized escape sequence in c#?
Can we have static indexer in c#?