C#

C#

Made by DeepSource

Unusual data type specified for enum CS-P1021

Performance
Major

An enum by default uses int as an underlying data type. However, changing this to a type whose size is less than that of int's is likely an unnecessary optimization as such an optimization would not necessarily yield any performance improvements. Any performance improvements, if gained, however, are likely to be minute.

Bad Practice

enum E : sbyte
{
    // ...
}

Recommended

enum E
{
    // Not specifying any type defaults to int
}