Table of Contents

SA1107: Code should not contain multiple statements on one line

Cause

The C# code contains more than one statement on a single line.

Rule description

A violation of this rule occurs when the code contain more than one statement on the same line. Each statement should begin on a new line.

How to fix violations

To fix a violation of this rule, move each statement to begin on its own line.

How to suppress violations

[SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1107:CodeMustNotContainMultipleStatementsOnOneLine", Justification = "Reviewed.")]
#pragma warning disable SA1107 // CodeMustNotContainMultipleStatementsOnOneLine
#pragma warning restore SA1107 // CodeMustNotContainMultipleStatementsOnOneLine