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

What is a callback c#?

540


what is .NET framework architecture ??

1553


What is .net c#?

475


Will the following code compile?

552


Give examples for reference types?

535






What does readonly mean in c#?

536


What is the purpose of abstract class in c#?

490


Is array a collection c#?

523


Why do canadians say zed?

516


What is multithreading? What are the problems that comes with multithreading and how to manage them?

547


How does foreach loop work in c#?

478


Is c# different than c++?

514


What are methods c#?

484


How to find out that the code is written as managed or un-managed code?

592


What does using system mean in c#?

492