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

How does foreach loop work in c#?

480


What is pure abstract class in c#?

456


What is windows application in c#?

472


What is activator c#?

477


What is deadlock in c#?

505






Can derived classes have greater accessibility than their base types?

539


What is difference between int and int in c#?

451


How does inheritance work in c#?

621


What is static void main in c#?

502


What are anonymous types in c#?

477


What are custom exceptions?

532


How a two-dimensional array declared in C#?

567


Explain the difference between the debug class and trace class?

498


What is use of FormBoarderStyle Propertie

532


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

544