Enums in C# sharing the same value

Curiosities of the C# programming language...

The other day while working in some legacy code I discovered that it is possible for two enum values to be the same.

The code I found looks a little bit more like this.

public enum ImportType
{
    // other values in the enum
    Resources = 50,
    Translations = 51,
    // other values in the enum
    TrainingPlans = 51,
    Individuals = 60
    // enum continues
}

I was a litte bit shocked to find out that this is a completely valid C# statement. I am still investigating the legacy code to see why this particular enum was defined like this.

For the time being, the only functional case where I think this would make sense is the following:

public enum ImportType
{
    Resources = 1,
    Translations = 2,
    TrainingPlans = 3,
    Individuals = 4,
    Default = Resources
}

In this case the Default ImportType would be Resources, meaning that you can have two different flags (to separate them functionally in other business code) but in the end they hold the same enum value thus doing something 'very' similar.