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 a nullreferenceexception?
What is connection pooling in ado.net?
In which order the destructor is called for an inherited class?
What language do desktop applications use?
Can we override main method in c#?
What is difference between managed and unmanaged code?
Explain different properties of object oriented systems.
What is the importance of closing an ado.net application?
What is default value of bool in c#?
Explain the process of polymorphism with an example?
Explain the access modifiers in c#?
What is a variable in c#?
What is interface inheritance?
What is difference between list and ilist in c#?
While debugging a C# application can you change the value of a variable?