* Enumerable.cs: Add missing cast Average on IEnumerable<long?> to
ensure the result is not truncated.
[Found using Gendarme's ReviewCastOnIntegerDivisionRule]
svn path=/trunk/mcs/; revision=114330
+2008-09-28 Sebastien Pouliot <sebastien@ximian.com>
+
+ * Enumerable.cs: Add missing cast Average on IEnumerable<long?> to
+ ensure the result is not truncated.
+ [Found using Gendarme's ReviewCastOnIntegerDivisionRule]
+
2008-09-11 Jb Evain <jbevain@novell.com>
* Enumerable.cs (Iterate*): use a bool empty instead of an int counter.
{
Check.Source (source);
- return source.AverageNullable<long, long, double> ((a, b) => a + b, (a, b) => a / b);
+ return source.AverageNullable<long, long, double> ((a, b) => a + b, (a, b) => (double) a / b);
}
public static double? Average (this IEnumerable<double?> source)