TypeName | SA1136EnumValuesShouldBeOnSeparateLines |
CheckId | SA1136 |
Category | Readability Rules |
📝 This rule is new for StyleCop Analyzers, and was not present in StyleCop Classic.
Multiple enum values are placed on the same line of code.
A violation of this rule occurs when two or more enum values are placed on the same line of code.
For example, the following code would produce a violation of this rule:
public enum ExampleEnum
{
FirstValue, SecondValue
}
The following code would not produce any violations:
public enum ExampleEnum
{
FirstValue,
SecondValue
}
To fix a violation of this rule, place each enum value on its own line.
#pragma warning disable SA1136 // Enum values should be on separate lines
public enum ExampleEnum
{
FirstValue, SecondValue
}
#pragma warning restore SA1136 // Enum values should be on separate lines