Show / Hide Table of Contents

Interface INumberFormatter

The numbers that can be localised.

Namespace: Sepia.Globalization.Numbers
Assembly: Sepia.Globalization.dll
Syntax
public interface INumberFormatter

Methods

| Improve this Doc View Source

Format(Decimal)

Localises a Decimal.

Declaration
string Format(decimal value)
Parameters
Type Name Description
Decimal value

The number to localise.

Returns
Type Description
String

The localised string representation of the value according to the Locale and NumberOptions.

| Improve this Doc View Source

Format(Decimal, String)

Localises a Decimal currency.

Declaration
string Format(decimal value, string currencyCode)
Parameters
Type Name Description
Decimal value

The number to localise.

String currencyCode

An ISO 4217 currency code. For example: "CNY", "NZD" or "JPY".

Returns
Type Description
String

The localised string representation of the value and currencyCode according to the Locale and NumberOptions. The number of significant digits is controlled by currency definition.

| Improve this Doc View Source

Format(Double)

Localises a Double.

Declaration
string Format(double value)
Parameters
Type Name Description
Double value

The number to localise.

Returns
Type Description
String

The localised string representation of the value according to the Locale and NumberOptions.

| Improve this Doc View Source

Format(Double, String)

Localises a Double currency.

Declaration
string Format(double value, string currencyCode)
Parameters
Type Name Description
Double value

The number to localise.

String currencyCode

An ISO 4217 currency code. For example: "CNY", "NZD" or "JPY".

Returns
Type Description
String

The localised string representation of the value and currencyCode according to the Locale and NumberOptions. The number of significant digits is controlled by currency definition.

| Improve this Doc View Source

Format(Int64)

Localises a Int64.

Declaration
string Format(long value)
Parameters
Type Name Description
Int64 value

The number to localise.

Returns
Type Description
String

The localised string representation of the value according to the Locale and NumberOptions.

| Improve this Doc View Source

Format(Int64, String)

Localises a Int64 currency.

Declaration
string Format(long value, string currencyCode)
Parameters
Type Name Description
Int64 value

The number to localise.

String currencyCode

An ISO 4217 currency code. For example: "CNY", "NZD" or "JPY".

Returns
Type Description
String

The localised string representation of the value and currencyCode according to the Locale and NumberOptions. The number of significant digits is controlled by currency definition.

  • Improve this Doc
  • View Source
Back to top Generated by DocFX