CA1501: Avoid excessive inheritance
Visual Studio 2010
TypeName | AvoidExcessiveInheritance |
CheckId | CA1501 |
Category | Microsoft.Maintainability |
Breaking Change | Breaking |
The following example shows a type that violates the rule.
using System; namespace MaintainabilityLibrary { class BaseClass {} class FirstDerivedClass : BaseClass {} class SecondDerivedClass : FirstDerivedClass {} class ThirdDerivedClass : SecondDerivedClass {} class FourthDerivedClass : ThirdDerivedClass {} // This class violates the rule. class FifthDerivedClass : FourthDerivedClass {} }