25

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

Umair Ahmed
  • 11,238
  • 5
  • 33
  • 39

1 Answers1

55
Enum.GetNames(typeof(SomeEnum)).Length;
Robert Koritnik
  • 103,639
  • 52
  • 277
  • 404