Cosmos/source2/Build/Cosmos.Build.Common/ExtensionMethods.cs
Trivalik_cp 7f84d28d69 add DOTNETCOMPABILE define condition,
change StackContents to uint,
able to use now mnemoric with 3 operands,
shl IL near 64 bit (unknown error),
add asm line to nasm error
2011-02-22 17:03:42 +00:00

24 lines
No EOL
433 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;
}
}
}