Browse
Sample.LibCore.DataMoneyExtensions
.md
class

MoneyExtensions

publicstatic
namespace Core.Data; public static class MoneyExtensions

Extension methods for Money.

Extension Methods

#public static Money Sum(this IEnumerable<Money> source)

Sums a sequence of amounts.

sourceThe amounts to sum.

returnsThe total, or Zero for an empty sequence.

#public static string Format<TFormatter>(this Money money, TFormatter formatter) where TFormatter : IFormatProvider, new()

Formats the amount for display.

TFormatterThe formatter type.

moneyThe amount.

formatterThe formatter.

returnsThe formatted amount, e.g. 12.50 EUR.