C#


ROSLYN.DESIGN.CA1027 : Mark enums with FlagsAttribute (C#)

See Roslyn-Detected C# Warning Classes for more information.

Summary

An enumeration is a value type that defines a set of related named constants. Apply FlagsAttribute to an enumeration when its named constants can be meaningfully combined.

This check corresponds to Roslyn rule CA1027. For full rule details, see the Microsoft website: CA1027.

Properties

Class Name Mark enums with FlagsAttribute (C#)
Significance reliability
Mnemonic ROSLYN.DESIGN.CA1027
Categories None
Availability Available for C# only.
Enabling Checks for this warning class are disabled by default. To enable them, add the following WARNING_FILTER rule to the project configuration file.
WARNING_FILTER += allow class="Mark enums with FlagsAttribute (C#)"

Relevant Configuration File Parameters

The following configuration file parameters affect checks for this warning class.