I want to create a nested structure where every class represents a country, inheriting the same parent class Country
. Each child class should have an enum representing the different states States
.
The goal is being able to select a country, then one of its states.
The Content will be saved into a dictionary Dictionary<Tuple<string, Type>, object>
where the Type
s would be Country
and Country.States
.
I tried making an interface
/abstract class
with an enum
called States
to be implemented, but this does not work, as it is a type definition.
Is there any workaround?
public abstract class Country
{
public abstract enum States { get; }
}
public class CountryA : Country
{
public new enum States
{
StateA,
StateB,
StateC,
}
}