📜  如何将字符串转换为枚举? - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:41.940000             🧑  作者: Mango

代码示例1
YourEnum foo = (YourEnum) Enum.Parse(typeof(YourEnum), yourString);