LINQ and IEnumerable?

  • Thread starter Thread starter Ivan
  • Start date Start date
Trying your example:

decimal ss = (decimal)(from a in Items select (decimal) a.Price).Sum();

Get error:

Error 21 Could not find an implementation of the query pattern for source
type 'System.Collections.IEnumerable'. 'Select' not found. Consider
explicitly specifying the type of the range variable 'a'.
 
Trying your example:

decimal ss = (decimal)(from a in Items select (decimal) a.Price).Sum();

Get error:

Error 21 Could not find an implementation of the query pattern for source
type 'System.Collections.IEnumerable'. 'Select' not found. Consider
explicitly specifying the type of the range variable 'a'.
 
Same error:

Error 21 Could not find an implementation of the query pattern for source
type 'System.Collections.IEnumerable'. 'Select' not found. Consider
explicitly specifying the type of the range variable 'a'.
 
Same error:

Error 21 Could not find an implementation of the query pattern for source
type 'System.Collections.IEnumerable'. 'Select' not found. Consider
explicitly specifying the type of the range variable 'a'.
 
Back
Top