can we throw execption from catchblock

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can constructor be overloaded in c#?

559


What are controls in c#?

583


How do I convert a string to an int in c#?

596


What is the default value of object in c#?

548


What is the usage of OLE?

665






Can fields inside a class be virtual?

614


What is the main purpose of xml?

575


How many static constructors are allowed in a class?

560


Can a class have more than 1 destructor?

608


Why we use get and set method in c#?

577


What is array c#?

605


What are types of constructor?

570


What do u mean by delegation of authority?

623


What are get and set in c#?

663


Which namespace is required to implement trace ?

616