"Relational and Type Pattern Matching"

var salary = user switch {
	Manager { YearsAtCompany: >= 5, DirectReports: { Count: >= 10 } } => 120_000, // Managers who have worked at the company for at least 5 years and have at least 10 direct reports get 120,000
	Manager { YearsAtCompany: >= 5 } => 100_000, // Managers who have worked at the company for at least 5 years get 100,000
	Manager => 70_000, // All other managers get 70,000 (notice no discard '_' variable required any more)
	{ YearsAtCompany: >= 3, Age: >= 18 } => 50_000, // Anyone else who's at least 18 and has worked 
	_ => 30_000 // Everyone else gets 30,000
};


Code snippet taken from "Two Decades of C#: A Reference - C# 9".