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 |
What is the difference between a private assembly and a shared assembly?
What if an error occurs in Catch block, how can you prevent it?
Is an array an object c#?
What is Private Constructor? and it’s use? Can you create instance of a class which has Private Constructor?
Explain About web methods and its various attributes
What's the difference between a method and a procedure?
What operator means?
Is it possible to implement an interface to a structure? Is it possible to extend a struct? Is it possible to inherit a class to struct?
9 Answers IBM, Logica CMG, TCS,
Differentiate between method overriding from method overloading with its functionality?
Can an interface inherit an interface
Write a C# program to find the Factorial of n
what are the benefits in using c# ?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)