Skip to content

Glossary: C# Beyond the Basics

pattern

Also written: patterns, pattern matching

A shape you test a value against: its type, a constant, a range, its properties or its items. Patterns are used with `is` and in switch expressions.

Where the book teaches it

Related terms

switch expressionlist patternproperty patterntype pattern