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

Explain linq to entities? : Entity framework

1032


I want to fetch data from datareader. i have three tables in datareader. i want to bind my two table with datagrid, then i want to fetch a value from my third table. do u have any idea pls help me. we use dr.nextresult() for multiple tables.

2604


What is basic authentication in web api?

1053


how to disable the lazy loading framework?

1090


What you mean by routing in mvc?

1107


What is an asynchronous controller in asp.net mvc?

1051


What is conceptual model? : Entity framework

934


Is it possible to create a custom filter?

1000


How does servicing work for the .net framework 3.0?

937


Give an example for authorization filters in an asp.net mvc application?

984


Which are the important namespaces used in ASP.Net MVC?

1089


i want to take the fast track training on >net Frame work and work flows and share point could you tellme the good institutes for that cources

2018


What is mvc entity framework?

966


What are the advantages of mvc over asp.net?

1024


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

1052