更新时间:2022-11-25 16:18:21
如果枚举项的值是连续的,方法工作得很好。但是,无论如何,您可以使用字典< DayOfTheWeek,字符串>
(其性能较差)。
If the values of your enum items are contigious, the array method works pretty well. However, in any case, you could use Dictionary<DayOfTheWeek, string>
(which is less performant, by the way).