Why is it a bad idea to throw your own exceptions?
Answer / daniel
Well, if at that point you know that an error has occurred,
then why not write the proper code to handle that error
instead of passing a new Exception object to the catch
block? Throwing your own exceptions signifies some design
flaws in the project.
Is This Answer Correct ? | 3 Yes | 2 No |
Can we instantiate abstract class in c#?
What is the Main difference between String and StringBuilder and why do we use StringBuilder.
15 Answers Aditya, CTS, Siemens,
What's the difference between class and object?
How do partial classes work in c#?
What does dbml stand for?
What does the keyword virtual mean in the method definition?
3 Answers Ipog Software, Satyam, Visual Soft,
What is wpf c#?
What is the difference between TypeOf, GetType and what are the uses of TypeOf, GetType.
Is double a decimal?
Is string reference type / value type?
56 Answers Accenture, Microsoft, Siemens,
What is concatenation and when should it be used?
Give 2 scenarios where static constructors can be used?