Skip to content

How to use new .NET 9 string.Join(char, ReadOnlySpan<string?>) with ReadOnlySpan<string>? #109829

Discussion options

You must be logged in to vote

The warning disappears in <LangVersion>preview</LangVersion>, the new first-class span feature should allow nullability covariance for spans.

Meanwhile, you can use ReadOnlySpan<string?>.CastUp to workaround this.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kindermannhubert
Comment options

Answer selected by kindermannhubert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants