如何获得枚举选择列表? [英] How to get the Choice List as an Enum?

查看:77
本文介绍了如何获得枚举选择列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想轻松地从代码中获取Choice列表,而不是在代码中到处都写常量,有没有一种方法可以获取分配给属性的Choice列表,并以枚举或枚举的方式编程获取它.诸如此类(作为安全性许可)?

I would like to easyly get the Choice list in code and not to write the Constants everywhere in my code, is there a way to get the Choice list I assigned to a property and get it programatically as an Enum or something like that (As the security Permisions)??

感谢:D

SebaXOR

推荐答案

Hi

您可以在运行时在Enum中添加或删除值,也不能对其进行扩展.

You can add or delete values in Enum at the runtime, and you can't extend it too.

但是您可以在运行时访问选择列表值.

But you can access choice list values at runtime .

以下是相同的讨论:

如何在运行时访问选择列表值

希望对您有所帮助.


这篇关于如何获得枚举选择列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆