Class EnumerableProducts
- Namespace
- Garyon.Extensions
- Assembly
- Garyon.dll
Contains extensions for calculating the product of a collection.
public static class EnumerableProducts
- Inheritance
-
EnumerableProducts
- Inherited Members
Methods
Product(IEnumerable<int>)
Calculates the product of a collection of int values.
public static int Product(this IEnumerable<int> source)
Parameters
sourceIEnumerable<int>The collection of values whose product to calculate.
Returns
Remarks
Be wary of potential overflows. Consider using the ProductInt64(IEnumerable<int>) method, if appropriate.
Product(IEnumerable<long>)
Calculates the product of a collection of long values.
public static long Product(this IEnumerable<long> source)
Parameters
sourceIEnumerable<long>The collection of values whose product to calculate.
Returns
Product(IEnumerable<uint>)
Calculates the product of a collection of uint values.
public static uint Product(this IEnumerable<uint> source)
Parameters
sourceIEnumerable<uint>The collection of values whose product to calculate.
Returns
Remarks
Be wary of potential overflows. Consider using the ProductUInt64(IEnumerable<uint>) method, if appropriate.
Product(IEnumerable<ulong>)
Calculates the product of a collection of ulong values.
public static ulong Product(this IEnumerable<ulong> source)
Parameters
sourceIEnumerable<ulong>The collection of values whose product to calculate.
Returns
ProductInt64(IEnumerable<int>)
Calculates the product of a collection of int values.
public static long ProductInt64(this IEnumerable<int> source)
Parameters
sourceIEnumerable<int>The collection of values whose product to calculate.
Returns
ProductUInt64(IEnumerable<int>)
Calculates the product of a collection of int values.
public static ulong ProductUInt64(this IEnumerable<int> source)
Parameters
sourceIEnumerable<int>The collection of values whose product to calculate.
Returns
ProductUInt64(IEnumerable<uint>)
Calculates the product of a collection of uint values.
public static ulong ProductUInt64(this IEnumerable<uint> source)
Parameters
sourceIEnumerable<uint>The collection of values whose product to calculate.