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 the use of viewmodel in mvc?

1003


Briefly describe the roles of clr in .net framework?

927


Is it possible to combine asp.net webforms and asp.mvc and develop a single web application?

942


What is route config?

906


What is the difference between windows vista and .net framework 3.0 ?

944


What is the difference between entity framework and mvc?

988


Explain Bundle.Config in ASP.Net MVC4?

958


Explain the request flow in asp.net mvc framework?

954


What is action methods in web api?

1060


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

1008


Explain the advantages of dependency injection (di) in asp.net mvc?

996


What is the use .Glimpse in ASP.Net MVC

987


Does razor engine supports for tdd?

1113


What is page life cycle?

921


what do you mean by table-per-type?

1041