SA1403.md
August 24, 2015 ยท View on GitHub
SA1403
| TypeName | SA1403FileMayOnlyContainASingleNamespace |
| CheckId | SA1403 |
| Category | Maintainability Rules |
Cause
A C# code file contains more than one namespace.
Rule description
A violation of this rule occurs when a C# file contains more than one namespace. To increase long-term maintainability of the code-base, each file should contain at most one namespace.
How to fix violations
To fix a violation of this rule, ensure that the file only contains a single namespace.
How to suppress violations
[SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1403:FileMayOnlyContainASingleNamespace", Justification = "Reviewed.")]
#pragma warning disable SA1403 // FileMayOnlyContainASingleNamespace
#pragma warning restore SA1403 // FileMayOnlyContainASingleNamespace