| TypeName | SA1205PartialElementsMustDeclareAccess |
| CheckId | SA1205 |
| Category | Ordering Rules |
The partial element does not have an access modifier defined.
A violation of this rule occurs when the partial elements does not have an access modifier defined.
C# 9 allows partial methods to have access modifiers and non-void return types. For compatibility across versions,
SA1205 does not require these access modifiers to be included. In addition, the compiler enforces the presence of access
modifiers when using the new features, so SA1205 will not apply duplicate diagnostics in cases where required modifiers
are omitted.
To fix an instance of this violation, specify an access modifier for the partial element.
[SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1205:PartialElementsMustDeclareAccess", Justification = "Reviewed.")]#pragma warning disable SA1205 // PartialElementsMustDeclareAccess
#pragma warning restore SA1205 // PartialElementsMustDeclareAccess