Code inspection: Move to existing positional deconstruction pattern
This inspection reports a recursive object pattern on a tuple-like value that can be moved into an existing positional deconstruction pattern. In the tested cases, named member checks such as width and height are rewritten into positional tuple checks.
Example
var t = (width: 0, height: 1, "aa");
if (t is { width: 0, height: 1 })
{
}
var t = (width: 0, height: 1, "aa");
if (t is (0, 1, _))
{
}
Quick-fix
Move matching member checks into the positional deconstruction pattern.
30 March 2026