NumberAbbreviationExtensions.Format

Extension Method in NumberAbbreviationExtensions

Declaration

public static string Format(this NumberAbbreviation[] abbreviations, float number)

Description

Abbreviates a number to a string with the given set of abbreviations.

Parameters

abbreviationsThe possible abbreviations to apply.
numberThe number to abbreviate.

Returns

stringThe number abbreviated as a string, or the number as a string if no abbreviations apply.

Overload

Declaration

public static string Format(this NumberAbbreviation[] abbreviations, double number)

Description

Abbreviates a number to a string with the given set of abbreviations.

Parameters

abbreviationsThe possible abbreviations to apply.
numberThe number to abbreviate.

Returns

stringThe number abbreviated as a string, or the number as a string if no abbreviations apply.

Overload

Declaration

public static string Format(this NumberAbbreviation[] abbreviations, int number)

Description

Abbreviates a number to a string with the given set of abbreviations.

Parameters

abbreviationsThe possible abbreviations to apply.
numberThe number to abbreviate.

Returns

stringThe number abbreviated as a string, or the number as a string if no abbreviations apply.

Overload

Declaration

public static string Format(this NumberAbbreviation[] abbreviations, short number)

Description

Abbreviates a number to a string with the given set of abbreviations.

Parameters

abbreviationsThe possible abbreviations to apply.
numberThe number to abbreviate.

Returns

stringThe number abbreviated as a string, or the number as a string if no abbreviations apply.

Overload

Declaration

public static string Format(this NumberAbbreviation[] abbreviations, long number)

Description

Abbreviates a number to a string with the given set of abbreviations.

Parameters

abbreviationsThe possible abbreviations to apply.
numberThe number to abbreviate.

Returns

stringThe number abbreviated as a string, or the number as a string if no abbreviations apply.