mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 12:30:32 +00:00
24 lines
No EOL
410 B
C#
24 lines
No EOL
410 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace Cosmos.Build.Common
|
|
{
|
|
public static class ExtensionMethods
|
|
{
|
|
public static uint Sum(this IEnumerable<uint> source)
|
|
{
|
|
if (source == null)
|
|
{
|
|
throw new ArgumentNullException("source");
|
|
}
|
|
ulong sum = 0Lu;
|
|
foreach (uint val in source)
|
|
{
|
|
sum += val;
|
|
}
|
|
return (uint)sum;
|
|
}
|
|
}
|
|
} |