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 do you understand by the terms datareader object and dataset object?

1 Answers  


What is the difference between readonly and const

4 Answers   Emphasis,


What is a console in c#?

1 Answers  


What's the c# syntax to catch any possible exception?

1 Answers  


Is array ienumerable c#?

1 Answers  


What is the predicate of a sentence?

1 Answers  


What are the desktop applications?

1 Answers  


Can we have multiple constructors in a class c#?

1 Answers  


what are implementation inheritance and interface inheritance?

1 Answers  


What are the Types of JIT and what is econo-JIT

1 Answers   TCS,


What is clr namespace?

1 Answers  


what is an internal specifier? what happens internally when I use access specifier Internal ?

4 Answers   rsystems,


Categories