For this You can use the static method Enum.GetNames
var myEnumMemberCount = Enum.GetNames(typeof(MyEnum)).Length;
Liked By
Write Answer
Total number of items defined in an enum C#
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy
Join MindStick Community
You have need login or register for voting of answers or question.
Anonymous User
02-Apr-2018For this You can use the static method Enum.GetNames
var myEnumMemberCount = Enum.GetNames(typeof(MyEnum)).Length;