Enumerations and Type Merging
- Updated2025-03-28
- 1 minute(s) read
When updating an enumeration instance, the enumerator information is never changed. If the enumerator exists in the updated type definition, the numeric value of the instance is updated to match the new type definition. If the enumerator does not exist, the instance being updated is left unchanged, but is now invalid.
This behavior is analogous to behavior in C, C++, and C#. In these languages, changing the value of an enumerator in the enumeration definition implicitly changes the numeric value ofthe enumerator everywhere it is used in source files. Deleting or renaming an enumerator inthe enumeration definition causes dependent code not to compile until it has been fixed.