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 lazy loading in entity framework?

1088


What is oauth in web api?

1022


what is conceptual model?

1034


Is .net framework going away?

1027


What are the main features of asp.net mvc 4 used by asp.net web api?

1078


what is .edmx file and what it contains?

1044


How to change the action name in mvc?

989


Explain what is asp.net mvc?

1127


What are the benefits of .net framework?

1008


What is action methods in web api?

1131


Which version of the common language runtime (clr) does the .net framework 3.0 use?

1083


What is Area in ASP.Net MVC?

1096


What is Separation of Concerns in ASP.NET ASP.Net MVC?

1176


What is asp net framework?

970


What is net framework 3.0 ?

1094