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 code verification?
What is the reason behind the invention of c#?
What is the full form of GAC? Explain its uses?
What are the 2 types of data types available in c#?
Why do we use class in c#?
What is array and its types in c#?
Is array passed by reference in c#?
Name the connections does microsoft sql server support?
What are data types with examples?
If a method's return type is void, can you use a return keyword in the method?
What is firstordefault c#?
Difference between value and reference type. What are value types and reference types?
Can we write class inside a class in c#?
Can we have two main methods in c#?
What is the use of nullable types in c#?