Code inspection: Use positional deconstruction pattern
This inspection reports recursive property patterns that can be written more clearly as positional patterns. It usually appears when several properties in a pattern match the natural deconstruction order of the target type or tuple.
Example
var point = (x: 0, y: 1, z: 2);
if (point is { x: 0, y: 1 })
{
}
var point = (x: 0, y: 1, z: 2);
if (point is (0, 1, _))
{
}
Quick-fix
A positional pattern is shorter and makes it easier to see which shape is being matched.
30 March 2026