Last Updated: May 22, 2026
List patterns match the shape of an array, a List<T>, or anything sequence-like by writing the expected elements inside square brackets. They arrived in C# 11 and finished the pattern matching story: where property patterns describe an object's fields, list patterns describe an object's contents. This chapter covers the bracket syntax, the slice operator .., where these patterns work, where they don't, and the runtime cost of each match.