Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 1.33 KB

devenv-assignmentcompatibility-property.md

File metadata and controls

38 lines (28 loc) · 1.33 KB
title description ms.author ms.date ms.topic author ms.reviewer
AssignmentCompatibility Property
Sets whether an Enum can be assigned to from another Enum type.
solsen
05/14/2024
reference
SusanneWindfeldPedersen
solsen

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;

See Also

Extensible Enums