Razzo78
4/9/2020 - 8:41 PM

C# - Enum to list

C# - Convert an enumeration to a list of values

List<Era> eras = System.Enum
				.GetValues(typeof(Era))
				.Cast<Era>()
				.ToList();

enum Era
{
	Paleolitico,
	Neolitico,
	Mesozoico,
	Paleozoico
}