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 / vijay k chin

the above block will not execute as control will be unable to enter in to the filnally block. So return statement should be always in finally block not in the try block.

Is This Answer Correct ?    1 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between private and protected in c#?

494


What is jit? What are the different types of jit?

571


Do unused Namespaces in c# affect run-time performance?

524


What does it mean to override a method?

469


What is function and method in c#?

513






What is gui in c#?

546


Why static variables are used?

524


What is the difference between dynamic and var in c#?

465


What's your approach to fetch static data in your windows form application?

508


What is the difference between serialization and deserialization in c#?

452


Explain clr in brief.

552


List the differences between method overriding and method overloading?

490


What is a nested type. Give an example?

619


Why c# is called c sharp?

465


Are tuples immutable c#?

508