I\'ve got a class with a number of attributes, and I need to find a way to get a count of the number of attributes it has. I want to do this because the class reads a CSV file,
This is untested and just off the top of my head
System.Reflection.MemberInfo info = typeof(StaffRosterEntry); object[] attributes = info.GetCustomAttributes(true); var attributeCount = attributes.Count();