Converting Array to IEnumerable<T>
问题 To my surprise, I get the following statement: public static IEnumerable<SomeType> AllEnums => Enum.GetValues(typeof(SomeType)); to complain about not being able to convert from System.Array to System.Collection.Generic.IEnumerable . I thought that the latter was inheriting from the former. Apparently I was mistaken. Since I can't LINQ it or .ToList it, I'm not sure how to deal with it properly. I'd prefer avoiding explicit casting and, since it's a bunch of values for an enum , I don't think