The System.Collections.Generic.List
type implements IEnumerable
, so I should be able to call Select
or use a from
expression, but doing so the compiler complains it is not supported.
CodePudding user response:
The Select
is an extension method. In order for the C# compiler to pick up this method you must add a using statement.
using System.Linq;
With this, your code now compiles.