Liquid XML Data Binder
LiquidTechnologies.XmlObjects Namespace / LxLinqExtensions Class / Sum Method / Sum<TSource>(IEnumerable<TSource>,Func<TSource,Nullable<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

In This Topic
    Sum<TSource>(IEnumerable<TSource>,Func<TSource,Nullable<BigDecimal>>) Method
    In This Topic
    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,Nullable(Of BigDecimal)) _
    ) As BigDecimal
    public static BigDecimal Sum<TSource>( 
       System.Collections.Generic.IEnumerable<TSource> source,
       System.Func<TSource,Nullable<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