24

How to get the count of total values defined in an enumeration?

Umair Ahmed
  • 10,652
  • 5
  • 31
  • 38

1 Answers1

52
Enum.GetNames(typeof(SomeEnum)).Length;
Robert Koritnik
  • 100,870
  • 50
  • 272
  • 398