C#遍历枚举类

            List<string> list = new List<string>();
            foreach (var item in Enum.GetNames(typeof(MyEnum)))
            {
                list.Add(item.ToString());
            }
posted @ 2021-10-12 16:27  Exceedingly  阅读(83)  评论(0)    收藏  举报