private int F23 = 42; // Noncompliant - access through this?. void M9(PrivateFieldUsedAsLocalVariable inst) { F19 = inst.F19; if (inst.F20 == 42) { Console.WriteLine(); } F20 = 0; inst.F21 = 42; if (F21 == 42) { Console.WriteLine(); } PrivateFieldUsedAsLocalVariable.F22 = 42; Console.WriteLine(F22); this?.F23 = 42; }
void M9(PrivateFieldUsedAsLocalVariable inst) { F19 = inst.F19; if (inst.F20 == 42) { Console.WriteLine(); } F20 = 0; inst.F21 = 42; if (F21 == 42) { Console.WriteLine(); } PrivateFieldUsedAsLocalVariable.F22 = 42; Console.WriteLine(F22); this?.F23 = 42; }