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 the difference between ienumerable and icollection?

558


What are the Types of instancing properties and explain each. Explain the difference between multiuse,singleuse and globalmultiuse and which is default

623


What is the purpose of static?

582


Can abstract class have constructor c#?

540


What is hashtable c#?

542






What is Satellite Assemblies ?

643


What is generic types in c#?

576


What is a web service in c#?

657


What is c# used for?

610


Does console.writeline() stop printing when it reaches a null character within a string?

604


What is the use of command builder?

620


What is difference between singleordefault and firstordefault?

580


Are string objects mutable or immutable?

610


Explain the 3 types of properties in c# with an example?

622


What does writeline mean?

614