count number of enum values C#

C#
int count = Enum.GetValues(typeof(EnumType)).Length;
Source

Also in C#: