C#


ROSLYN.DESIGN.CA1002 : Do not expose generic lists (C#)

See Roslyn-Detected C# Warning Classes for more information.

Summary

System.Collections.Generic.List is a generic collection that's designed for performance and not inheritance. List does not contain virtual members that make it easier to change the behavior of an inherited class.

This check corresponds to Roslyn rule CA1002. For full rule details, see the Microsoft website: CA1002.

Properties

Class Name Do not expose generic lists (C#)
Significance reliability
Mnemonic ROSLYN.DESIGN.CA1002
Categories None
Availability Available for C# only.
Enabling Checks for this warning class are disabled by default. To enable them, add the following WARNING_FILTER rule to the project configuration file.
WARNING_FILTER += allow class="Do not expose generic lists (C#)"

Relevant Configuration File Parameters

The following configuration file parameters affect checks for this warning class.