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

Do I need microsoft .net framework?

945


What is viewdata?

979


What is the advantage of mvc?

993


What is the domain object?

932


what is more complex to implement property, methods or event? how can I define criteria to compare the difficulty of implementation between them? for example the number of methods wanted to implements property is 2 methods. how many methods I need it to implements events?

2162


What is the importance of NonActionAttribute?

1025


What are differences between entity framework and l2s? : Entity framework

1089


Which filter executes first in an asp.net mvc application?

938


Explain the advantages of asp.net mvc over asp.net?

1045


What are html helpers in asp.net mvc?

986


What is managed extensibility framework?

948


Can you Write the GC(Garbage Collector) Algoritham in .NET? (But not Explination of Working of GC).

2240


How can I return string result from action in asp.net mvc?

1008


Explain what platforms does the .net framework run on?

980


What are Validation Annotations?

982