ArrayExtensions.Reduce<TElement, TSum>
Extension Method in ArrayExtensions
Declaration
public static TSum Reduce<TElement, TSum>(this TElement[] array, TSum initialValue, ArrayExtensions.Reducer<TSum, TElement> reducer)Description
Reduces the elements of the array to a single value.
Type Parameters
| TElement | The type of elements in the array. |
| TSum | The type of the reduced value. |
Parameters
| array | The array to reduce. |
| initialValue | The initial value to use. |
| reducer | The reducer to use. |
Returns
| T | The reduced value. |