I have a list of enum names. This list could be more descriptive to have the enum path such as Library.Base.Enums.{EnumName} if that helps.The enums could be in different folders such as MyEnumCategories could be stored in the folder Library/Base/Enums/Category/ and MyEnumCities could be in Library/Base/Enums/Locations/. I have a growing list of enum names and I need to be able to get all the values stored in the enums from the list. I need to return all the values the enums as shown below:
List<string> enumNames=["MyEnumCategories","MyEnumCities"]
List<string> values = new List<strings>
public enum MyEnumCategories
{
Service = 0,
Corporate = 1,
Enterprise = 2,
AllSites = 3,
IndividualSites = 4,
Site = 5,
Notification = 6
}
public enum MyEnumCities
{
Chicago= 0,
Boston= 1,
NewYork= 2,
Denvor= 3,
Austin= 4,
Seattle= 5,
SanFrancisco= 6
}
OUTPUT: values =["Service","Corporate ","Enterprise ",...."Seattle","SanFrancisco",]