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
Is int reference type c#?
Explain About Postback
Differentiate between object pooling and connection pooling in c#?
Explain the use of SN.exe
How do you pronounce c#?
What does do in c#?
What is concrete class in c#?
What is double c#?
What do you mean by “finalize” and “finally” methods in c#?
Explain the process of abstraction with an example?
Define an abstract class?
Why do we need delegates in c#?
What is use of a HashTable in .NET?
Why do we use stringbuilder in c#?
i want o/p 011242110 in c# code.