C#


ROSLYN.DESIGN.CA1034 : Nested types should not be visible (C#)

See Roslyn-Detected C# Warning Classes for more information.

Summary

A nested type is a type that is declared in the scope of another type. Nested types are useful to encapsulate private implementation details of the containing type. Used for this purpose, nested types should not be externally visible.

This check corresponds to Roslyn rule CA1034. For full rule details, see the Microsoft website: CA1034.

Properties

Class Name Nested types should not be visible (C#)
Significance reliability
Mnemonic ROSLYN.DESIGN.CA1034
Categories None
Availability Available for C# only.
Enabling Checks for this warning class are disabled by default. To enable them, add the following WARNING_FILTER rule to the project configuration file.
WARNING_FILTER += allow class="Nested types should not be visible (C#)"

Relevant Configuration File Parameters

The following configuration file parameters affect checks for this warning class.