ArrayExtensions.Sum
Extension Method in ArrayExtensions
Declaration
public static int Sum(this int[] array)Description
Calculates the sum of all elements in the array.
Parameters
| array | The array to sum. |
Returns
| int | The sum of all elements in the array. |
Overload
Declaration
public static float Sum(this float[] array)Description
Calculates the sum of all elements in the array.
Parameters
| array | The array to sum. |
Returns
| float | The sum of all elements in the array. |
Overload
Declaration
public static double Sum(this double[] array)Description
Calculates the sum of all elements in the array.
Parameters
| array | The array to sum. |
Returns
| double | The sum of all elements in the array. |