CS.HIDDEN.MEMBER.PARAM.CLASS

Class data member is hidden by a function parameter.

Vulnerability and risk

When function parameters hide members of containing classes, those members become accessible only through 'this' link. This behaviour is most likely not intended.

Example 1

1  class Zoo {
2      private int deers;
3      int numberOfSpecies;
4      void LodgeDeers (bool deers) {  // defect - method parameter hides a class member
5          if (deers)
6              numberOfSpecies++;
7      }
8  }