FloatExtensions.ToAbbreviatedString
Extension Method in FloatExtensions
Declaration
public static string ToAbbreviatedString(this float number)Description
Converts the number to an abbreviated string, e.g. "1k" for 1000.
Parameters
| number | The number to abbreviate. |
Returns
| string | The number abbreviated as a string, or the number as a string if no abbreviations apply. |
Overload
Declaration
public static string ToAbbreviatedString(this float number, NumberAbbreviation[] abbreviations)Description
Converts the number to an abbreviated string with a given set of possible abbreviations.
Parameters
| number | The number to abbreviate. |
| abbreviations | The abbreviations to use. |
Returns
| string | The number abbreviated as a string, or the number as a string if no abbreviations apply. |