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

In which way a two-dimensional array declared in C#?

0 Answers   Siebel,


What is an abstract class c#?

0 Answers  


What are data types with examples?

0 Answers  


What is xml comments in c#?

0 Answers  


Why do we use public static void main in c#?

0 Answers  






Why we use get and set property in c#?

0 Answers  


What are abstract classes in c#?

0 Answers  


What is the usage of Enumeration in C# Programming and is it good to use or not ?

0 Answers   MCN Solutions,


What is the difference between ienumerable and iqueryable?

0 Answers  


Hai, I want to open a new form while the previous form is hiding or closing. I tried this with using MDI.I created one form like ParentForm.placed one button control.when clicked one that it opend new form like ChildForm.When i set the property of ChildForm to Maximize,but the ParentForm button control also appearing on the childform. so plz help me how to hide parentform controls(hide parentform while it is childform opened) thanq..

1 Answers  


What are custom attributes in c#?

0 Answers  


i want o/p 011242110 in c# code.

0 Answers   TCS,


Categories