Open huoyaoyuan opened 1 year ago
Tagging subscribers to this area: @dotnet/area-system-linq See info in area-owners.md if you want to be subscribed.
Author: | huoyaoyuan |
---|---|
Assignees: | - |
Labels: | `api-suggestion`, `area-System.Linq`, `code-analyzer`, `code-fixer` |
Milestone: | - |
Note that Enumerable.Append
is not directly supported in net47
or older.
https://apisof.net/catalog/6ae58543-a1b1-3617-8780-227339489ae8
Note that
Enumerable.Append
is not directly supported innet47
or older.
Yes, it needs extra attention for netstandard2.0
, since it requires a shim on net461-net47.
For non-netstandard platforms, just detecting the existence of the methods should be sufficient.
With collection expressions, there are actually additional options with spread: [..values, morevalue]
. But maybe there are ones still prefer method call.
Since
Append
andPrepend
comes much later thanEnumerable.Concat
, there are many old code usingConcat
with single-element array:which can be converted into:
Prepend
is less common, and changes the order of two elements in code, but it would be more natural.Category: Performance Severity: Info