enum
should be unique CS-W1088Values in an enum
should always be unique. Having 2 different members of an enum
carry the same value is likely a mistake. Since such a flawed value can affect how your application behaves, it is recommended that you fix it as soon as possible.
enum ErrorCode
{
None = 0,
Unknown = 1,
ConnectionLost = 100,
OutlierReading = 100 // Likely a mistake
}
enum ErrorCode : ushort
{
None = 0,
Unknown = 1,
ConnectionLost = 100,
OutlierReading = 200
}