Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Sum() [10/10]

static ? long System.Linq.Enumerable.Sum ( this IEnumerable< long?> source)
inlinestatic

Definition at line 7778 of file Enumerable.cs.

7779 {
7780 if (source == null)
7781 {
7782 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.source);
7783 }
7784 long num = 0L;
7785 foreach (long? item in source)
7786 {
7787 if (item.HasValue)
7788 {
7789 num = checked(num + item.GetValueOrDefault());
7790 }
7791 }
7792 return num;
7793 }

References System.item, System.L, System.Linq.source, and System.Linq.ThrowHelper.ThrowArgumentNullException().