Iterating over non-incremental Enum

前端 未结 15 1700
长发绾君心
长发绾君心 2021-01-31 15:42

Before you ask, I\'ve looked and looked for this on SO, and cannot find a solid answer.

I need to be able to dynamically iterate over an enum that has non-incre

15条回答
  •  一生所求
    2021-01-31 16:24

    Put them into an array or other container and iterate over that. If you modify the enum, you will have to update the code that puts them in the container.

提交回复
热议问题