SA1007 - Visual-Stylecop/Visual-StyleCop GitHub Wiki
<title>SA1007: OperatorKeywordMustBeFollowedBySpace</title>
<script src="script/helpstudio.js" type="text/javascript"></script>
<script src="script/StandardText.js" type="text/jscript"></script>
<script type="text/jscript">WritePageTop(document.title);</script>
TypeName |
OperatorKeywordMustBeFollowedBySpace |
CheckId |
SA1007 |
Category |
Spacing Rules |
The operator keyword within a C# operator overload method is not followed by any whitespace.
A violation of this rule occurs when the operator keyword within an operator overload method is not followed by any whitespace. The operator keyword should always be followed by a single space. For example:
public MyClass operator +(MyClass a, MyClass b)
{
}
To fix a violation of this rule, add a single space after the operator keyword.
[SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1007:OperatorKeywordMustBeFollowedBySpace", Justification = "Reviewed.")]
</div>
</body>