AssignmentCompatibility Property

Version: Available or changed with runtime version 5.0.

Sets whether an Enum can be assigned to from another Enum type. This is intended for backwards compatibility when splitting existing Options into multiple Enums.

Applies to

  • Enum Type

The default value of this property is false.

Important

This property provides backwards compatibility in certain cases when converting from options to enums. It should not be used for enums that are not converted from options. Because the assignment is done by ordinal value without validation, there is no guarantee that the target will have a corresponding value. Special attention should be made if either source or target is marked as extensible.

Syntax

AssignmentCompatibility = true;

Extensible Enums