CS.HIDDEN.MEMBER.LOCAL.STRUCT

Struct data member is hidden by a local variable.

Vulnerability and risk

When local variables 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 bears;
3      void KillBears () {
4          bool bears = false;  // defect - local variable hides a struct member
5      }
6  }