I stumbled upon a code where my colleague has recently modified an existing enum and added another enum just before the last enum, I am guessing he may have done this because the last enum was None(we are not in the same timezone to discuss).
My worry is if any code in the solution tries to fetch the integer value of None Enum(which I couldn't find anywhere luckily, but what about some code tries to do in future), then this will potentially produce wrong results.
Wouldn't it be safe to?
- Either Add Enum in the last
- Or associate an integer value against each enum so that ordering issue can be resolved?
Please throw some light.
Update: In one of the SO question, I read @Marc Gravell mentioning that inserting in the middle is dangerous, did I understand him correctly? Please see https://stackoverflow.com/a/12716043/2719527