# MoneyExtensions

`class` `public` `static`

```csharp
namespace Core.Data;

public static class MoneyExtensions
```

Extension methods for [`Money`](Money.md).

## Extension Methods

{% member id="sum" %}
```csharp
public static Money Sum(this IEnumerable<Money> source)
```

Sums a sequence of amounts.

* **source**: The amounts to sum.

**Returns**: The total, or [`Zero`](Money.md#zero) for an empty sequence.

{% /member %}

{% member id="format" %}
```csharp
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`.

{% /member %}
