c# count all value in array code example
Example 1: count number of enum values C#
int count = Enum.GetValues(typeof(EnumType)).Length;
Example 2: c# count items in listbox
listBox1.Items.Count
int count = Enum.GetValues(typeof(EnumType)).Length;
listBox1.Items.Count