DoubleExtensions.ToAbbreviatedString

Extension Method in DoubleExtensions

Declaration

public static string ToAbbreviatedString(this double value)

Description

Converts the number to an abbreviated string, e.g. "1k" for 1000.

Parameters

valueThe 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 ToAbbreviatedString(this double value, NumberAbbreviation[] abbreviations)

Description

Converts the number to an abbreviated string with a given set of possible abbreviations.

Parameters

valueThe number to abbreviate.
abbreviationsThe possible abbreviations.

Returns

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