Enums are convenient in c#, and we use them for a variety of reasons such as roles, or statuses. For example, we can have a public enum Roles { Subscriber, Editor, Admin } …And it is often the case that we want drop down lists in forms on the front end for specifying which role a particular user is. We also wanted one function to ‘rule them all’ so that you do not need a new function for every new enum you create.
Here is our result:
and you would use it by
var dropDownList = EnumDropDownList<Roles>()