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...


can we throw execption from catchblock

Answers were Sorted based on User's Feedback



can we throw execption from catchblock..

Answer / praseetha sandeep

yes, we can throw...
catch(Exception e)
{
....
thow e
}

you can also throw new exceptin of different type
catch(IOException c)
{....
throw new FileNotFoundexception(filename)
}

we can also do like
catch(IOException c)
{
throw new FileNotFoundexception(filename,c)
}

Is This Answer Correct ?    6 Yes 0 No

can we throw execption from catchblock..

Answer / suman dey

yes we can use 'throw' or new Exception.

Is This Answer Correct ?    4 Yes 0 No

can we throw execption from catchblock..

Answer / nithya

We can throw exception in catch block

Like

try
{
int a=10/0;
}
catch(Exception ex)
{
throw ex;
}

Is This Answer Correct ?    4 Yes 0 No

can we throw execption from catchblock..

Answer / ganni

the 'try' block contains the code which may have the
runtime errors. to handle that errors we use 'catch' block.

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More C Sharp Interview Questions

What is the namespcae generally given to the webpage of the .NET Framework ?

0 Answers   Siebel,


Why are strings in c# immutable?

0 Answers  


how to retrieve binary data from database (using c#.net and sql server/windows application)

2 Answers   Soltius,


List the difference between the virtual method and the abstract method?

0 Answers  


Can we create extension method for interface?

0 Answers  


Why static constructor is parameterless in c#?

0 Answers  


What?s class SortedList underneath?

1 Answers  


What does return do in unity?

0 Answers  


In a stored procedure 4 select stmts there.If error comes in one select stmt will remaining normally executes?

7 Answers   Microsoft,


in the nunit test framework, which attribute must adorn a test class in order for it to be picked up by the nunit gui?

0 Answers   Siebel Systems,


What is session c#?

0 Answers  


What is uint64?

0 Answers  


Categories