Lets say for maintenance and DataContract serialization i need to add the default value 0 to an existing enum where it wasn't present.
public enum ExistingEnum { Value1 = 1, Value2 = 2, Value3 = 3 }
Becomes:
public enum ExistingEnum { None = 0, Value1 = 1, Value2 = 2, Value3 = 3 }
All the properties that relied on taking the Value1 as default value are now causing a chain of problems and related Exceptions. Is there a way, like an attribute, to impose Value1 as the default value, again? Something similar to:
public enum ExistingEnum
{
None = 0,
[Default] Value1 = 1,
Value2 = 2,
Value3 = 3
}
Thanks in advance