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 / prajaktaa

In this scenario, the whole try block will get executed and
control will then be passed to finally block.
But an error come while executing finally block that Cannot
exit from finally block and execution gets stucks.

Is This Answer Correct ?    11 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a static property. Give an example?

522


What is the keyword used to prevent a class from being inherited by another class?

668


What is a derived class in c#?

476


Why do we use overloading in c#?

479


Does c# support const methods, properties, or events?

548






Why do we need interfaces in c#?

487


What is singleordefault c#?

510


Name some string escape sequences in c#.

570


What is array class in c#?

461


What is difference between ilist and list in c#?

485


What is a streamwriter in c#?

508


Why delegates are type safe in c#?

505


Which is the best language for desktop application?

472


What is form feed and carriage return?

483


What is an ienumerable in c#?

545