Symbol and its member assigned together (CA2246)
Key dotnet.codequality.symbol-member-same-statement · Severity warning · Category codequality
Microsoft analyzer CA2246. Flags a statement that assigns a variable and one of its members at once (a = a.Next = x). The member is set on the old object, which is rarely what was meant.
Incorrect
Section titled “Incorrect”node = node.Next = candidate;Correct
Section titled “Correct”node.Next = candidate;node = candidate;