You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Use collection expression" appears to only be offered if it would not cause the chosen overload to switch. However, this would often be useful. It's likely a poor API design that has significant semantics changes between overloads just based on the type of the collection.
string.Split added a params ReadOnlySpan<char> in .NET 9, and the "use collection expression" fix stopped being offered on string.Split because of this. However, it's vastly preferable to switch to calling the ReadOnlySpan overload.
To play it uber-safe, this code suggestion could have the "may changes semantics" notation added to it.
Version Used: 17.12.0 preview 1.0
"Use collection expression" appears to only be offered if it would not cause the chosen overload to switch. However, this would often be useful. It's likely a poor API design that has significant semantics changes between overloads just based on the type of the collection.
string.Split
added aparams ReadOnlySpan<char>
in .NET 9, and the "use collection expression" fix stopped being offered on string.Split because of this. However, it's vastly preferable to switch to calling the ReadOnlySpan overload.To play it uber-safe, this code suggestion could have the "may changes semantics" notation added to it.
The text was updated successfully, but these errors were encountered: