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'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top