AmountExtensionsSumTSource Method |
Computes the sum of the sequence of amount values that are obtained by
invoking a transform function on each element of the input sequence.
Namespace:
Aloe.EnterpriseOne.Model
Assembly:
Aloe.EnterpriseOne.Model (in Aloe.EnterpriseOne.Model.dll) Version: 20.1.3.5
Syntaxpublic static Amount Sum<TSource>(
this IEnumerable<TSource> source,
Func<TSource, Amount> selector
)
<ExtensionAttribute>
Public Shared Function Sum(Of TSource) (
source As IEnumerable(Of TSource),
selector As Func(Of TSource, Amount)
) As Amount
public:
[ExtensionAttribute]
generic<typename TSource>
static Amount^ Sum(
IEnumerable<TSource>^ source,
Func<TSource, Amount^>^ selector
)
[<ExtensionAttribute>]
static member Sum :
source : IEnumerable<'TSource> *
selector : Func<'TSource, Amount> -> Amount
Parameters
- source
- Type: System.Collections.GenericIEnumerableTSource
A sequence of values that are used to calculate a sum. - selector
- Type: SystemFuncTSource, Amount
A transform function to apply to each element.
Type Parameters
- TSource
- The type of the elements of source.
Return Value
Type:
AmountThe sum of the projected values.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IEnumerableTSource. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also