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 / claivan

Finally block will not return any values as it gives
error "Control cannot leave the body of a finally clause".
The finally block is useful for cleaning up any resources
allocated in the try block.

Is This Answer Correct ?    13 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you use abstract class and interface?

736


What is singleordefault?

685


What is Inheritance in C#?

773


how to stored and retrive video in Sql server using asp.net c#......?

729


Define an abstract class?

674


Why References are stored on heap and variables on stack?

708


Is c# substring zero based?

688


Can you have an array of arrays?

688


What is parameter c#?

725


What is parse method in c#?

628


Is a decimal an integer?

662


What is the difference between finalize() and dispose()?

676


Can the accessibility of a type member be greater than the accessibility of its containing type?

734


Are string objects mutable or immutable?

700


What are partial types in c#?

648