Skip to content

Glossary: C# Beyond the Basics

when guard

Also written: when

An extra condition after a pattern: the arm matches only if the condition is also true, as in `_ when item.OnHand <= item.ReorderAt => "LOW"`.

Where the book teaches it

Related terms

patternswitch expression