Enum.GetValues 方法 检索指定枚举中常数值的数组。 官网写的很清楚,没事多看看、多记录; Enum.GetValues 方法 (System) | Microsoft Docshttps://docs.microsoft.com/zh-cn/dotnet/api/system.enum.getvalues?view=net-6.0#code-try-2