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
Define a jagged array in c#?
Is c# and .net same?
Is stringbuilder thread safe c#?
Is class reference type c#?
Is struct object oriented?
What is signature c#?
Why singleton class is sealed?
When do you generally use a class over a struct?
Can a struct have a default constructor (a constructor without parameters) or a destructor in c#?
What is satellite assembly? And steps to create satellite assembly?
How does dependency injection work c#?
What are the variables in c#?
What does string format do?
Can we inherit sealed class in c#?
What is field in c#?