Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 939 Bytes

SA1403.md

File metadata and controls

39 lines (29 loc) · 939 Bytes

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