Skip to main content

CRR0018 - Suspect assignment reversal

This analyzer detects reassignment statements that never change the variable value. The code snippet below shows an example:

string t = name;
name = t; // CRR0018

The second assignment statement is redundant, because the name variable does not change. Remove the second assignment statement to resolve this issue:

string t = name;