Explain about throw keyword?

Answer Posted / tiger kumar

yes,its used to throw the user defined exception.

But its not always good habit to use throw exception.

Some times we can predict it will throw the exception.If we
know the error will come there in the earlier means why we
need to use the exceptions.we can solve it while writtting
code itself.

Is This Answer Correct ?    11 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between method overriding and method overloading?

483


Which .gang of four. Design pattern is shown below?

500


What are controls in c#?

480


Why singleton class is sealed in c#?

515


What is ildasm and obfuscator in net?

546






What does void mean in c#?

517


Write a short note on interface?

586


What is generic and non generic collections in c#?

437


How many types of inheritance are there in c#?

478


We cannot create instances of static classes. Can we have constructors for static classes?

519


What is the difference between the debug class and trace class? Documentation looks the same.

511


What is serialization in unity?

505


How to sign an assembly with strong name?

581


Is Facebook a desktop application?

471


Can we have 2 main methods in c#?

485