Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
C#
/
Pattern matching
Why can an arbitrary IEnumerable<string> not be matched directly with ["run", var file]?
from Pattern matching
C# 14 / .NET 10
intermediate
1 min
Why can an arbitrary IEnumerable<string> not be matched directly with ["run", var file]?
List patterns require a count and an indexer; IEnumerable only promises enumeration.
List patterns accept numeric elements only.
A list pattern always mutates its input.
The syntax is limited to collection expressions.
Check
Ask AI about this kata
Report an error
next kata
What does this program print?
Predict the output
A new version is available
Reload