Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6008183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:47:19+00:00 2026-05-23T01:47:19+00:00

Enumerable.Sum() is only defined for IEnumerable where T in double, double? int, int? decimal,

  • 0

Enumerable.Sum() is only defined for IEnumerable where T in

double,
double?
int,
int?
decimal,
decimal?
long,
long?
float,
float?

Is there a reason for not defining for byte, short or uint?

  1. Is it to avoid overflow problems?
  2. Or does it make type inference difficult for compiler? (Most Likely)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T01:47:19+00:00Added an answer on May 23, 2026 at 1:47 am

    Because when you add a short and a short the outcome can be handled by an int.
    Could be some CLS compliant issues as well. This was posted as a similiar question:

    Why is there no Sum() extension for IEnumerable<uint>

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There are 4 overloaded signatures for Enumerable.SelectMany. To make it simple, we ignore the
I am trying to come up with a linq query to convert an IEnumerable<int>
I have an enumerable that takes a long time to get the next value.
I have the code Enumerable.Range(100, 100) .Select(x => x / 10) Is there a
Enumerable.Range(0, int.MaxValue) .Select(n => Math.Pow(n, 2)) .Where(squared => squared % 2 != 0) .TakeWhile(squared
Hey, I'm using the Enumerable.Sum() extension method from LINQ to compute hash codes, and
Given class: public class FooAmounts int Id decimal Month1 decimal Month2 ... decimal Month12
Possible Duplicate: Puzzling Enumerable.Cast InvalidCastException Hi, I just noticed something quite strange with the
I often plug pre-configured lambdas into enumerable methods like 'map', 'select' etc. but the
I am writing the following in LINQ Enumerable.Range(50, 100).Select(n => n/10 == 1) but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.