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

◆ Sum() [8/10]

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

Definition at line 7747 of file Enumerable.cs.

7748 {
7749 if (source == null)
7750 {
7751 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.source);
7752 }
7753 int num = 0;
7754 foreach (int? item in source)
7755 {
7756 if (item.HasValue)
7757 {
7758 num = checked(num + item.GetValueOrDefault());
7759 }
7760 }
7761 return num;
7762 }

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