示例#1
0
        public static List <T> Perform <T>()
        {
            ValidateEnum.Perform <T>();

            var values = Enum.GetValues(typeof(T));

            return(values.Cast <T>().ToList());
        }
示例#2
0
        public static string NewLineSeparated <T>()
        {
            ValidateEnum.Perform <T>();
            var values = GenerateEnumList.Perform <T>();

            var output = values[0].ToString();

            for (var i = 0; i < values.Count - 1; ++i)
            {
                output += "\n" + values[i + 1];
            }

            return(output);
        }