SA1019.md
November 28, 2025 ยท View on GitHub
SA1019
| TypeName | SA1019MemberAccessSymbolsMustBeSpacedCorrectly |
| CheckId | SA1019 |
| Category | Spacing Rules |
Cause
The spacing around a member access symbol is incorrect, within a C# code file.
Rule description
A violation of this rule occurs when the spacing around a member access symbol is incorrect. A member access symbol should not have whitespace on either side, unless it is the first character on the line. This includes member access that immediately follows the null-forgiving operator (!) introduced with nullable reference types in C# 8, such as value!.Property or value!?.Method().
How to fix violations
To fix a violation of this rule, ensure that the member access symbol is not surrounded by any whitespace.
How to suppress violations
[SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1019:MemberAccessSymbolsMustBeSpacedCorrectly", Justification = "Reviewed.")]
#pragma warning disable SA1019 // MemberAccessSymbolsMustBeSpacedCorrectly
#pragma warning restore SA1019 // MemberAccessSymbolsMustBeSpacedCorrectly