相关疑难解决方法(0)

如何将整数转换为枚举类型?

我知道如何将枚举类型转换为整数.

type
  TMyType = (mtFirst, mtSecond, mtThird); 

var 
  ordValue:integer;
  enumValue:TMyType;
...
ordValue:= Ord(mtSecond); // result is 1
Run Code Online (Sandbox Code Playgroud)

但是,如何进行逆运算并将整数转换为枚举类型?

delphi integer enumeration casting

23
推荐指数
3
解决办法
2万
查看次数

标签 统计

casting ×1

delphi ×1

enumeration ×1

integer ×1