When should I throw an exception?



When should I throw an exception?..

Answer / Yudhbir Singh

"Throwing an exception is used in C# when an exceptional event occurs, such as a file not found, division by zero, or any other unexpected conditions that might arise during the execution of the program."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

What is InterFace???

12 Answers  


List the two important objects of ado.net and also list the namespaces that are commonly used in ado.net to aid in connection to a database.

1 Answers  


What is a verbatim string literal and why do we use it?

1 Answers  


what is Anonymous Method.? and What is shadowing?

2 Answers   ATS, Infosys,


What is the difference between gettype and typeof in c#?

1 Answers  


What is iqueryable?

1 Answers  


What are the concepts of dispose method?

1 Answers  


How do you create dlls in .NET

1 Answers   Digital GlobalSoft,


Difference between a sub and a function in c#.

1 Answers  


What is the difference between continue and break statement?

1 Answers  


What is Web.config?

1 Answers   Amazon,


What is the difference between const and readonly in c#.net?

1 Answers  


Categories