same number of fields as well as definitions:
E.g:
enum class EnumA {
Normal,
Abnormal
}
enum class EnumB {
Normal,
Abnormal
}
Is there a recommended way of having a single Enum class which holds the (Normal, Abnormal) fields, from which enum classes EnumA and EnumB can reference, instead of having a repetition of defining the same number of fields(order and names)?
Have you tried Sealed classes?
Обсуждают сегодня