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


Please Help Members By Posting Answers For Below Questions

How do you declare a method in c#?

578


In languages without exception-handling facilities, we could send an error-handling procedure as a parameter to each procedure that can detect errors that must be handled. What disadvantages are there to this method?

693


What does string format do?

561


Name the property of the textbox which cannot be changed at runtime?

604


Explain the role of Garbage collector and its generations?

618






What is the use of static members with example using c#.net.

575


Is an interface a type c#?

619


Which namespaces are necessary to create a localized application?

690


Is it possible to nest cfml conditional tags?

626


Does c# support properties of array types?

612


What is a property c#?

592


What are the different types of classes in c#?

591


How do I download a program to my desktop?

550


What is a Jagged Array in C#?

636


What is difference between string and string builder?

600