SA1007: OperatorKeywordMustBeFollowedBySpace

StyleCop

TypeName

OperatorKeywordMustBeFollowedBySpace

CheckId

SA1007

Category

Spacing Rules

Cause

The operator keyword within a C# operator overload method is not followed by any whitespace.

Rule Description

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)

    {

    }

How to Fix Violations

To fix a violation of this rule, add a single space after the operator keyword.