What is difference between throw and throws in c#?



What is difference between throw and throws in c#?..

Answer / Anupam Rani

In C#, 'throw' keyword is used to throw an exception at runtime, while 'throws' is a part of Java's method signature that declares which exceptions the method can throw.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

can we throw execption from catchblock

4 Answers   Accenture,


Can we have a non static member function in a base class to be override in derived with static modifier?

7 Answers   Wipro,


What operators can be used to cast from one reference type to another without the risk of throwing an exception?

1 Answers  


What is the purpose of namespace in c#?

1 Answers  


Why do we use static class in c#?

1 Answers  


What is a Managed Code??

1 Answers  


Howmany five tracing levels in System.Diagnostics.TraceSwitcher? Why they are using?

1 Answers   Siebel,


What is difference between asp net and c# net?

1 Answers  


Explain About the Sattilite Assembly in .Net Technology?

2 Answers   TCS,


Can fields inside a class be virtual?

1 Answers  


Explain the difference between const and static read-only?

1 Answers  


what is the purpose of interface in c#.net

6 Answers  


Categories