As the error message says, you cannot assign an IEnumerable to an array. You need to call ToArray() to turn your IEnumerable into an array. Since this is a non-generic implementation you most likely need to call Cast<T>() as well. It would look something like