CS.HIDDEN.MEMBER.PARAM.STRUCT

Struct data member is hidden by a function parameter.

Vulnerability and risk

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

Example 1

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