Add fixer when for params
span overloads are used with Expression selected
#74030
Labels
Area-IDE
Feature Request
help wanted
The issue is "up for grabs" - add a comment if you are interested in working on it
Milestone
Summary
Span
andReadOnlySpan
overloads are preferred forparams
arguments, as described in the following code:Background and Motivation
C# prefers the
Span
andReadOnlySpan
overloads to improve performance, which is desirable in almost all cases. However, there is no resourcing to update expression trees to handle ref struct issues like this one. As a result, users that have expression trees will receive the errors described above.Proposed Feature
Add a fixer when this error occurs so the user is gently led to the explicit array overloads.
Alternative Designs
The C# LDM has considered whether to special case expression trees and decided not to do this at this time.
The text was updated successfully, but these errors were encountered: