Explain about throw keyword?

Answer Posted / mandeswara rao

Before catching an exception it is must to be thrown first.
This means that there should be a code somewhere in the
program that could catch the exception. We use throw
statement to throw an exception or simply use the throw
keyword with an object reference to throw an exception. A
single argument is required by the throw statement i.e. a
throwable object.

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do generics work in c#?

488


What's the difference between a method and a procedure?

483


What are the collections in c#?

478


Explain about multithreading?

556


Explain the use of Mutex in C#?

562






Why dependency injection is used in c#?

493


What is class method?

474


What is a hashset c#?

478


What's the difference between an integer and int?

537


What is array and arraylist?

544


How can I create a process that is running a supplied native executable (e.g., Cmd.exe)?

603


What is an array class?

522


How do you comment in c#?

495


Why attributes are used in c#?

477


Why do we need events in c#?

547