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.



Method1() { int a=0, b=0, c=0; Monitor.Enter(this) c = 12; b = 3; a = c/b ..

Answer / gautam

b

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More C Sharp Interview Questions

What is difference between method overriding and method overloading?

0 Answers  


What is gac? How to put assembly in gac?

0 Answers  


I want to single value if you give any integer value. Below are examples  1. Input: 123  Output: 6 2. Input: 99   9+9=18   1+8  Output: 9 How to get above output?

1 Answers   AxSys,


Define xslt.

0 Answers  


Explain when should you call the garbage collector in .net?

0 Answers  






What is meant by console programming?

0 Answers  


Can int be null c#?

0 Answers  


What is console used for?

0 Answers  


What are the principles of delegation?

0 Answers  


What is thread safe in c#?

0 Answers  


Define an escape sequence, name few strings in escape sequence?

0 Answers  


What is the different types of private assembly and shared assembly?

0 Answers  


Categories