Class DecimalExtensions
LINQ-inspired extension methods for
Inheritance
System.Object
DecimalExtensions
Namespace: X10D.Linq
Assembly: X10D.dll
Syntax
public static class DecimalExtensions : object
Methods
| Improve this Doc View SourceProduct(IEnumerable<Decimal>)
Computes the product of a sequence of
Declaration
public static decimal Product(this IEnumerable<decimal> source)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<System.Decimal> | source | A sequence of |
Returns
Type | Description |
---|---|
System.Decimal | The product the values in the sequence. |
Product<TSource>(IEnumerable<TSource>, Func<TSource, Decimal>)
Computes the product of a sequence of
Declaration
public static decimal Product<TSource>(this IEnumerable<TSource> source, Func<TSource, decimal> selector)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<TSource> | source | A sequence of values that are used to calculate a product. |
Func<TSource, System.Decimal> | selector | A transform function to apply to each element. |
Returns
Type | Description |
---|---|
System.Decimal | The product of the projected values. |
Type Parameters
Name | Description |
---|---|
TSource | The type of the elements of |