If I have code like
try
{
return;
}
catch
{
return;
}
finally
{
return;
}
from which block will the value will be returned. and try
has been executed without any error.
Answer Posted / claivan
Finally block will not return any values as it gives
error "Control cannot leave the body of a finally clause".
The finally block is useful for cleaning up any resources
allocated in the try block.
| Is This Answer Correct ? | 13 Yes | 0 No |
Post New Answer View All Answers
How can I check the type of an object at runtime?
Explain lock, monitors, and mutex object in threading.
Distinguish between system.string and system.text.stringbuilder classes?
Can a method return multiple values in c#?
What is argument in c#?
What do u mean by delegation of authority?
Name the method of servicebase class?
What are "class access modifiers" in C#?
How do I know if executenonquery is successful c#?
What are instance fields in c#?
What are virtual destructors?
What is access specifier in c#?
How to implement a singleton design pattern in c#?
What is wpf application in c#?
Define Virtual folder?