``++Enumerable.Sum()++`` always executes addition in a ``++checked++`` context, so an ``++OverflowException++`` will be thrown if the value exceeds ``++MaxValue++`` even if an ``++unchecked++`` context was specified. Using an ``++unchecked++`` context anyway represents a misunderstanding of how ``++Sum++`` works.
This rule raises an issue when an ``++unchecked++`` context is specified for a ``++Sum++`` on integer types.
@Tamas, according to you, does this rule makes sense ? Thanks
=== on 29 Jun 2015, 14:58:19 Tamas Vajk wrote:
\[~ann.campbell.2] I've modified the description to be more specific. Also, I've changed the examples to use ``++List<int>++`` because for ``++double++``s it won't throw the ``++OverflowException++``.