Challenge 3: Property, Positional, and Discard Patterns Together — Possible Solution ==================================================================== Program.cs: public record Point(int X, int Y); static string Describe(Point p) => p switch { { X: 0, Y: 0 } => "origin", (_, 0) => "on the X axis", _ => "elsewhere" }; Console.WriteLine(Describe(new Point(0, 0))); Console.WriteLine(Describe(new Point(5, 0))); Console.WriteLine(Describe(new Point(3, 4))); Output: origin on the X axis elsewhere Explanation: { X: 0, Y: 0 } is a property pattern, matching only when both named properties equal the given values -- it catches the (0, 0) case first. (_, 0) is a positional pattern using the record's own Deconstruct: it matches any Point whose second deconstructed value (Y) is 0, regardless of X (the discard _ accepts anything there) -- this is what "on the X axis" means. The final discard _ catches everything else, like (3, 4). Point (0, 0) matches the FIRST pattern in the switch even though it would also technically match (_, 0), since switch expressions test patterns top-to-bottom and stop at the first match. WHY THIS WORKS AS AN ANSWER ------------------------------ This combines a property pattern, a positional pattern using the record's own Deconstruct, and a final discard exactly as the chapter introduces them, tested against three genuinely different points to confirm each pattern fires correctly and pattern order is respected.