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
How do you declare a method in c#?
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?
What does string format do?
Name the property of the textbox which cannot be changed at runtime?
Explain the role of Garbage collector and its generations?
What is the use of static members with example using c#.net.
Is an interface a type c#?
Which namespaces are necessary to create a localized application?
Is it possible to nest cfml conditional tags?
Does c# support properties of array types?
What is a property c#?
What are the different types of classes in c#?
How do I download a program to my desktop?
What is a Jagged Array in C#?
What is difference between string and string builder?