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 client wins and store wins mode in entity framework concurrency?

1234


What is controllercontext?

1052


What are the difference between asynchronous controller implementation between asp.net mvc 3 & asp.net mvc 4?

1103


Possible ways to prevent xss attacks on mvc application?

1006


Explain ASP.NET MVC Identity and Security?

992


What is viewdata?

1033


Can you explain model, controller and view in mvc?

998


what is dot net? what is use dot net? what is benifit of dot net?what is vb dot net? what is ado dot net? what is c#?

2299


What are Scaffold templates in ASP.Net MVC?

1060


What is the "helperpage.isajax" property?

1154


what is use of entitydatasource control?

1098


What is meant by viewdata?

990


What is objectcontext? : Entity framework

1106


What is object service? : Entity framework

1175


Define the core components of an ASP.NET MVC application?

1092