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


Please Help Members By Posting Answers For Below Questions

Why do we use dataset in c#?

489


Is multilevel inheritance possible in c#?

480


Enlist all the components of an ado.net framework?

480


What is the adv of using System.Text.StringBuilder over System.String?

537


How do you access a constant field declared in a class?

498






Name the connections does microsoft sql server support?

487


What is the difference between interface and inheritance in c#?

473


What is sorted list in c#?

511


What is the main purpose of delegates in c#?

509


What is the difference between Decorator and Adapter pattern?

528


What is difference between write and writeline in c#?

488


What is action c#?

489


What is the use of list in c#?

474


What does .length do in c#?

525


What are circular references?

526