Why does List patterns require System.Index #5792
Answered
by
HaloFour
CreateAndInject
asked this question in
Q&A
-
.NET Framework can't compile this code since CS0518:
.NET5 produce this code:
There's no dependency to |
Beta Was this translation helpful? Give feedback.
Answered by
HaloFour
Feb 17, 2022
Replies: 1 comment 9 replies
-
Presumably some forms of list patterns do rely on |
Beta Was this translation helpful? Give feedback.
9 replies
Answer selected by
333fred
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Presumably some forms of list patterns do rely on
System.Index
andSystem.Range
and it's better to have the feature be supported in totality rather than some forms of the syntax work and other forms break. Also, now that C# ships in lock-step with .NET targeting new features on older runtimes isn't supported.