Why is there no linq for byte, uint?

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

double, double? Int, int? decimal fraction, decimal fraction? long, long? swim, swim?

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

  • Should overflow problems be avoided?
  • Or does it make complex type inference for the compiler? (Probably)
+3
source share
1 answer

Because when you add short and short, the result can be processed int. There may also be some CLS related issues. This was posted as a familiar question:

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

+1
source

All Articles