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
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈