TypeName | DoNotExposeGenericLists |
CheckId | CA1002 |
Category | Microsoft.Design |
Breaking Change | Breaking |
A type contains an externally visible member that is a System.Collections.GenericListT type, returns a System.Collections.GenericListT type, or whose signature includes a System.Collections.GenericListT parameter.
System.Collections.GenericListT is a generic collection that is designed for performance and not inheritance. System.Collections.GenericListT does not contain virtual members that make it easier to change the behavior of an inherited class. The following generic collections are designed for inheritance and should be exposed instead of System.Collections.GenericListT.
To fix a violation of this rule, change the System.Collections.GenericListT type to one of the generic collections that is designed for inheritance.
CA1005: Avoid excessive parameters on generic types
CA1010: Collections should implement generic interface
CA1000: Do not declare static members on generic types
CA1006: Do not nest generic types in member signatures
CA1004: Generic methods should provide type parameter