//声明枚举 public enum DefaultRoleType { Admin = 0, Edu = 1 } //遍历枚举 foreach (DefaultRoleType m_type in Enum.GetValues(typeof(DefaultRoleType))) { Console.WriteLine(m_type.ToString() ); }
Powered by: 博客园 Copyright © 2024 Sky_KWolf Powered by .NET 8.0 on Kubernetes