Explain about throw keyword?

Answer Posted / vibhor shukla

throw is used to throw an exception from any part of the
program not necessarily the method only.

whereas throws is particularly used to throw an exception
arising out of the use of a method to the exception handler
which is the catch block..

Is This Answer Correct ?    15 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of a console table?

477


If a child class instance is created, which class constructor is called first - base class or child class?

512


What does namespace mean?

519


What are winforms in c#?

505


What is static and use of it?

473






What is binding in c#?

494


What do u mean by thread safe?

504


What are the fundamental principles of oo programming?

502


How many types of serialization are there in c#?

463


What is difference between web and window application?

403


What are static and dynamic variables?

653


Difference between type constructor and instance constructor? What is static constructor, when it will be fired? And what is its use?

551


What is args c#?

538


What is asp net c# corner?

799


Is unboxing an implicit conversion?

543