----- **Warning: this wiki page is auto-generated by the Arnolyzer solution-build process. Do not directly edit this page, as your changes will be lost on the next commit.** To edit this page, please refer to [Contributing to this project](https://github.com/DavidArno/Arnolyzer/wiki/Contributing.md). These wiki pages reflect the state of the project in development, per the last commit. For details of the latest release of the Arnolyzer Analysers, please see the [Arnolyzer website](http://http://davidarno.github.io/Arnolyzer/). ----- # AA1102 - Inner Types Must Be Private # **Report code: AA1102-InnerTypesMustBePrivate** ## Summary ##
Status Implemented
Description Inner types should be treated as implementation details and encapsulated by marking them as private
Category Encapsulation Analyzers
Enabled by default: Yes
Severity: Error
## Cause ## Inner types that are marked `internal` or `public` are likely doing one (or, in some cases, both) of two things: 1. They are using the outer class as a namespace label, 2. They are exposing the inner workings of the outer class, thus weakening encapsulation. In the first case, the type should be moved to its own file in an appropriate directory to give it a proper namespace name. In the latter case, either the type should be made `private`, to properly encapsulate the inner workings of the outer class, or the two types should be redesigned and the inner type moved to its own file and marked as `internal` or `public` as appropriate. ## How to fix violations ## There currently aren't any implemented code-fixes for this rule. ## How to suppress violations ## This rule cannot be suppressed.