Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Types should not extend certain base types

TypeName

TypesShouldNotExtendCertainBaseTypes

CheckId

CA1058

Category

Microsoft.Design

Breaking Change

Breaking

An externally visible type extends certain base types. Currently, this rule reports types that derive from the following types:

For .NET Framework version 1, it was recommended to derive new exceptions from ApplicationException. The recommendation has changed and new exceptions should derive from System.Exception or one of its subclasses in the System namespace.

Do not create a subclass of XmlDocument if you want to create an XML view of an underlying object model or data source.

To fix a violation of this rule, derive the type from a different base type.

Do not exclude a warning from this rule for violations concerning ApplicationException. It is safe to exclude a warning from this rule for violations about XmlDocument.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.