Skip to content

Conversation

@xtqqczze
Copy link
Contributor

Update comments for CA1825: Avoid zero-length array allocations

It is not correct that Array.Empty<T>() doesn't exist in all configurations, the API is available from .NET Standard 1.3.

Update comments for CA1825: Avoid zero-length array allocations

It is not correct that `Array.Empty<T>()` doesn't exist in all configurations, the API is available from .NET Standard 1.3.
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Sep 19, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Sep 19, 2025
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-collections
See info in area-owners.md if you want to be subscribed.

@eiriktsarpalis eiriktsarpalis removed the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Oct 20, 2025
#pragma warning disable CA1825
// Array.Empty<T>() doesn't exist in all configurations
// Switching to Array.Empty also has a non-negligible impact on the working set memory
#pragma warning disable CA1825 // avoid the extra generic instantiation for Array.Empty<T>()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is removing important context from the implementation, why make it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-System.Collections community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants