Skip to content

csharp: Cleanup use of List<T> in APIs and implementation #1757

Description

@CurtHagenlocher

What feature or improvement would you like to see?

List<T> is frequently the wrong type to use. In an API signature, it prevents the use of an array or other collection and should often be replaced by something like IReadOnlyList<T> to allow a greater variety of types to be used and to signal that the collection will not be changed by the method.

In implementation, List<T> does not need to be used for lists of known, fixed length. T[] requires one less allocation and does better at signaling that the value is of fixed length.

Metadata

Metadata

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions