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.

source—The amounts to sum.

returns—The 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.

TFormatter—The formatter type.

money—The amount.

formatter—The formatter.

returns—The formatted amount, e.g. 12.50 EUR.