Pattern matching โ Basics
Overview
Section titled โOverviewโBasic patterns include type patterns, constant patterns, and simple property tests.
Introduced In
Section titled โIntroduced InโC# 7 (2017)
Example
Section titled โExampleโobject o = 42;if (o is int i && i > 0) { }