Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

enum element count C#

var count1 = typeof(TestEnum).GetFields().Length;
var count2 = Enum.GetNames(typeof(TestEnum)).Length;
var count3 = Enum.GetValues(typeof(TestEnum)).Length;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #enum #element #count
ADD COMMENT
Topic
Name
2+4 =