-
Notifications
You must be signed in to change notification settings - Fork 4
Gendarme.Rules.Design.AvoidVisibleNestedTypesRule(2.10)
Sebastien Pouliot edited this page Jan 22, 2011
·
2 revisions
Assembly: Gendarme.Rules.Design
Version: 2.10
This rule checks for nested types which are externally visible. Such types are often confused with namespaces which makes them more difficult to document and find by developers. In most cases it is better to make these types private or to scope them within a namespace instead of a type.
Bad example:
public class Outer {
public class Inner {
// ...
}
}
Good example (visibility):
public class Outer {
internal class Inner {
// ...
}
}
Good example (unnested):
public class Outer {
// ...
}
public class Inner {
// ...
}
- This rule is available since Gendarme 2.0
Note that this page was autogenerated (3/17/2011 9:31:58 PM) based on the xmldoc
comments inside the rules source code and cannot be edited from this wiki.
Please report any documentation errors, typos or suggestions to the
Gendarme Mailing List. Thanks!