For the complete documentation index, see llms.txt. This page is also available as Markdown.

Decimal Extensions

Useful extensions for use with decimals

These extensions can be found within the namespace UmbCheckout.Shared.Extensions

FormatCurrency

Returns the decimal as currency, with the currency's symbol and number of decimal places, in the current culture (or the culture you pass). This can be combined with GetIsoCurrencySymbol

string FormatCurrency(this decimal amount, string? currencyCode, CultureInfo? culture = null)
Example
Model.SubTotal.FormatCurrency(CultureInfo.CurrentUICulture.GetISOCurrencySymbol())

Last updated