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

How many types of interface are there in c#?

471


What is the difference between firstordefault and singleordefault?

476


Why does my windows application pop up a console window every time I run it?

518


What is extension method in c# and how to use them?

470


How to move to a state-related codebase?

892






what is a destructor?

594


Can firstordefault return null?

506


What is the difference between list and arraylist in c#?

412


What is difference between array and arraylist c#?

455


update data in an xml file which resides in solution itself, using silverlight 4.0

1372


Explain the difference between abstract class and interface in .net?

468


Can extension methods access private members?

512


Explain briefly the difference between value type and reference type?

549


Why are strings in c# immutable?

495


what is object-oriented programming (oop) language?

481