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 are circular references? How garbage collection deals with circular references.

710


What is the difference between console application and windows application?

718


How do you convert byte array to hexadecimal string, and vice versa?

750


Are c# generics the same as c++ templates?

657


How do I create a multi language, multi file assembly?

813


What is different between Implicit conversion and Explicit conversion in C#?

697


What are delegate methods?

683


Why do we use virtual methods in c#?

683


is it possible to access a remote web service Without UDDI?

753


Explain the difference between user control and custom control. Also, explain their use.

787


Which namespace is required to implement trace ?

714


Explain About Virtual functions and their use.

758


List down the different ide’s provided by microsoft for c# development.

657


What is _viewstart cshtml?

640


Is ram a heap?

682