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
What is difference between private and protected in c#?
What is jit? What are the different types of jit?
Do unused Namespaces in c# affect run-time performance?
What does it mean to override a method?
What is function and method in c#?
What is gui in c#?
Why static variables are used?
What is the difference between dynamic and var in c#?
What's your approach to fetch static data in your windows form application?
What is the difference between serialization and deserialization in c#?
Explain clr in brief.
List the differences between method overriding and method overloading?
What is a nested type. Give an example?
Why c# is called c sharp?
Are tuples immutable c#?