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
List the different stages of a thread?
Why do we need events in c#?
Why do we need serialization?
What does executescalar return in c#?
What is the use of system.environment class in c#.net?
Does google use c#?
What do you mean by the delegate in c#?
What is a variable in c#?
Explain get and set accessor properties?
What are c# attributes and its significance?
What is the difference between read and readline in c#?
Why linq is having select clause at the end?
Do void methods have parameters?
What are data types in C#?
Difference between Value type & reference types ? and give the example in .Net?