TypeName

OpeningSquareBracketsMustBeSpacedCorrectly

CheckId

SA1010

Category

Spacing Rules

Cause

An opening square bracket within a C# statement is not spaced correctly.

Rule Description

A violation of this rule occurs when an opening square bracket within a statement is preceded or followed by whitespace.

An opening square bracket must never be preceded by whitespace, unless it is the first character on the line, and an opening square must never be followed by whitespace, unless it is the last character on the line.

How to Fix Violations

To fix a violation of this rule, ensure that there is no whitespace on either side of the opening square bracket.