c# - Get List from Enum name as string
问题描述
I have some Enum like below
public enum A
{
A_1 = 1,
A_2 = 2,
A_3 = 3
}
public enum B
{
B_1 = 1,
B_2 = 2,
B_3 = 3
}
I want to get the list from enum when passing its name as string, for example if i pass "A" then I wan tot get the values from enum A as a list, how can I achieve this?
解决方案
推荐阅读
- javascript - React - 如何同时从两个 SQL 表映射?
- java - 将文件从 android 上传到 google drive 文件夹
- arduino - Arduino 2:1 错误 DHT + 函数
- c# - 与另一个组织的员工共享 Windows 10 商店 uwp 应用程序
- typescript - 测试缺少的接口属性
- python - 引发 TimeoutException(消息,屏幕,堆栈跟踪) selenium.common.exceptions.TimeoutException:消息:问题
- php - Laravel 我将如何获得这种连接?
- excel - VBA - 将美国日期转换为欧盟日期
- dialogflow-cx - 我们如何确保 BOT 记住用户提供的名称?
- python - 尽管 pip 列出了模块,但无法找到它