ReSharper 2024.1 Help

Code Inspection: Underlying type of enum is 'int'

Category

Redundancies in Symbol Declarations

ID

EnumUnderlyingTypeIsInt

EditorConfig

resharper_enum_underlying_type_is_int_highlighting

Default severity

Warning

Language

C#

Requires SWA

No

Specifying the enumeration type to be int is redundant because, by default, int is the default governing type for enumeration members. Consequently, the specification can be safely removed.

enum Letters : int // <-- not required { Alpha, Beta, Gamma }
Last modified: 15 April 2024