I try to
Collection.Aggregate(0.0,(current, next) => current += next.decimalValue);
but I get error of casting decimal to double
another issue: For “Sum” Linq the seed is the default type value?
meaning seed = 0 for decimal…
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The compiler interprets
0.0as a double, you need to specify the type as a decimal. Try the following:The
msuffix indicates that the numeric real literal (in this case0) is a decimal.