Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

If we write return statement in finally block will it works
fine or throws any error?

Answer Posted / mahesh kotekar

Answer Is NO. We cannot have return in finally block...
we get the following error.
Control cannot leave the body of a finally clause
returns void, a return keyword must not be followed by an
object expression

try
{
First.DoSomething1();
First.DoSomething2();

}
catch (Exception)
{

throw;
}
finally
{ return 0; }

Is This Answer Correct ?    5 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is oauth in web api?

1080


What are the new enhancements done in default project template of asp.net mvc 4?

1085


Do you know about the new features in ASP.Net MVC 4 ?

1159


What does a viewmodel do?

1138


Explain Sections is ASP.Net MVC?

1189


Which approach provides better support for test driven development - asp.net mvc or asp.net webforms?

1042


Possible ways to prevent xss attacks on mvc application?

1059


Can you use Razor code in Javascript in ASP.Net MVC?

1250


Does windows 10 need .net framework?

1063


What is object service? : Entity framework

1230


which are the key concepts of entity data model?

1145


What is managed extensibility framework?

1051


What is session state management?

1053


How to use multiple submit buttons in asp.net mvc?

1262


Explain what languages does the .net framework support?

1034