IEnumerable cannot be used with type arguments
You need to add an import of the namespace:
using System.Collections.Generic;
The type the compiler sees is System.Collections.IEnumerable
which is the non generic IEnumerable. You imported that namespace, so this is the type the compiler thinks you're trying to use.
The type you're trying to use is System.Collections.Generic.IEnumerable<T>
. Add an import of that namespace and things should compile.