asEnum<T> method

T asEnum<T>(
  1. List<T> values
)

As an enum from index (int) value. Pass the list of enum members typically called (Name of Enum).values

Implementation

T asEnum<T>(List<T> values)
{
  assertIsNotNull();
  int index = asInt();
  return values[index];
}