On Mon, 29 Sep 2008 10:35:34 -0700, Tony Johansson
<jo************ *****@telia.com wrote:
Hello!
If I want to create my own Exception class which class is the recommended
class to derive from.
Should it be from Exception or from System.Applicat ionException.
You should only post the question once.
As for the answer, MSDN has this to say:
If you are designing an application that needs to create
its own exceptions, you are advised to derive custom exceptions
from the Exception class. It was originally thought that
custom exceptions should derive from the ApplicationExce ption
class; however in practice this has not been found to add
significant value. For more information, see Best Practices for
Handling Exceptions
(
http://msdn.microsoft.com/en-us/library/seyhszts.aspx)
Pete