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

Explain About delegates

598


State whether it is true to test a Web service you must create a windows application or Web application to consume this service or not?

485


What is hierarchical inheritance in c#?

489


What is local function?

524


Why do we overload constructors?

497






What is assembly manifest?

528


What is a dictionary in c#?

498


Can destructors have access modifiers?

567


Is it true that all c# types derive from a common base class?

532


Do loops c#?

505


Is a dll an assembly?

481


Which of the following operations can you not perform on an ado.net dataset?

518


What are the basic string operations? Explain.

514


What is the use of tuple in c#?

514


Classes and structs can be declared as static, is this statement true or false?

553