Code inspection: Use deconstruction
This inspection reports tuple or tuple-like variables when the code mostly works with their individual components and those component accesses can be rewritten as deconstruction. In that situation, naming the components directly is often clearer than keeping a single tuple variable and repeatedly accessing .Item1, .Item2, or named tuple members.
Example
var point = GetPoint();
Console.WriteLine(point.X);
Console.WriteLine(point.Y);
var (x, y) = GetPoint();
Console.WriteLine(x);
Console.WriteLine(y);
Quick-fix
Deconstruction gives the important tuple parts explicit local names and removes repeated member access.
30 March 2026