get number ov values in enum +C# code example Example: count number of enum values C# int count = Enum.GetValues(typeof(EnumType)).Length;