Liquid XML Data Binder 2019
Sum<TSource>(IEnumerable<TSource>,Func<TSource,BigDecimal>) Method

LiquidTechnologies.XmlObjects Namespace > LxLinqExtensions Class > Sum Method : Sum<TSource>(IEnumerable<TSource>,Func<TSource,BigDecimal>) Method
The items in the collection
A sequence of TSource values to calculate the sum of.
Gets a BigDecimal from an item in the source
Computes the sum of a sequence of BigDecimal values.
Syntax
'Declaration
 
Public Overloads Shared Function Sum(Of TSource)( _
   ByVal source As System.Collections.Generic.IEnumerable(Of TSource), _
   ByVal selector As System.Func(Of TSource,BigDecimal) _
) As BigDecimal
public static BigDecimal Sum<TSource>( 
   System.Collections.Generic.IEnumerable<TSource> source,
   System.Func<TSource,BigDecimal> selector
)

Parameters

source
A sequence of TSource values to calculate the sum of.
selector
Gets a BigDecimal from an item in the source

Type Parameters

TSource
The items in the collection

Return Value

The sum of the values in the sequence.
Exceptions
ExceptionDescription
selector or source is null
Requirements

Target Platforms: Windows 10, Windows 8, Windows 7, Windows Vista, Windows Server 2016, Windows Server 2012, Windows Server 2008. Please ensure you have the latest Service Pack for your operating system installed.

See Also

Reference

LxLinqExtensions Class
LxLinqExtensions Members
Overload List