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

Posted by dss539 on Stack Overflow See other posts from Stack Overflow or by dss539
Published on 2010-05-06T21:11:03Z Indexed on 2010/05/06 21:18 UTC
Read the original article Hit count: 111

Filed under:

It seems that Sum not defined for IEnumerable<uint> (and other unsigned integers, for that matter)

var s = new int[] { 1, 2, 3 };
s.Sum(); //works fine

var us = new uint[] { 1, 2, 3 };
us.Sum(); //missing method

I would like to know:

  • Have I done something fundamentally wrong/misunderstood the situation?
  • What design decisions might cause the omission of IEnumerable<uint>.Sum()?

MSDN: Enumerable.Sum

© Stack Overflow or respective owner

Related posts about .NET