CA1501: Avoid excessive inheritance
Visual Studio 2012
|
TypeName |
AvoidExcessiveInheritance |
|
CheckId |
CA1501 |
|
Category |
Microsoft.Maintainability |
|
Breaking Change |
Breaking |
The following example shows a type that violates the rule.
Imports System Namespace MaintainabilityLibrary Class BaseClass End Class Class FirstDerivedClass Inherits BaseClass End Class Class SecondDerivedClass Inherits FirstDerivedClass End Class Class ThirdDerivedClass Inherits SecondDerivedClass End Class Class FourthDerivedClass Inherits ThirdDerivedClass End Class ' This class violates the rule. Class FifthDerivedClass Inherits FourthDerivedClass End Class End Namespace