| id | numbers-words-ordinals-roman-bytes-and-quantities |
|---|---|
| title | Number and data formatting scenarios |
| sidebar_position | 11 |
| diataxis | reference |
| persona | returning developer |
import CodeBlock from '@theme/CodeBlock'; import numbers from '!!raw-loader!../_examples/scenarios-numbers/Program.cs';
Choose one operation instead of treating every formatted number as the same kind of string:
| Task | Focused guide |
|---|---|
| Spell cardinal or ordinal numbers | Numbers in words and ordinals |
| Parse a localized number phrase | Parse number words |
| Inflect a noun and combine it with a count | Inflection and quantities |
| Format or parse storage and rates | Byte sizes and rates |
| Format or parse powers of 1000 | Metric numerals |
| Use Roman, compass, multiplier, tuple, or symbol helpers | Specialized formatting utilities |
This verified survey sets English culture and exercises one representative call from several families:
{numbers}
Focused guides separate the typed model, parsing contract, localization behavior, and failure modes. Pass CultureInfo directly where an overload permits it; scope both ambient cultures for APIs without a culture argument.
Do not persist humanized number text as the numeric source of truth. ByteSize uses binary multiples, metric numerals use decimal powers, number-word parsing has locale-specific grammar, and Roman numerals have a strict range. Keep the typed value and choose a parser only for an input format the application explicitly accepts.
The survey’s available calls compile and run against the selected package.
Number-word parsing begins in 3.0.1 and changes from int to long on
Humanizer 4. Culture-aware byte-rate formatting begins in 2.13.14.
Historical snapshots remove or replace unavailable focused pages.
- Numbers in words and ordinals
- Byte sizes and rates
- Localization and extensibility
- NumberToWordsExtension API
- OrdinalizeExtensions API
- ILongOrdinalizer API
- FractionalizeExtensions API
- ChineseFinancialNumeralExtensions API
- WordForm API
- RomanNumeralExtensions API
- ByteSize API
- ByteSizeUnitSystem API
- WordsToNumberExtension API
- WordsToDecimalNumberExtension API
- IWordsToDecimalNumberConverter API
- ByteSizeExtensions API
- ByteRate API
- MetricNumeralExtensions API
- MetricNumeralFormats API
- HeadingExtensions API
- NumberToNumberExtensions API
- TupleizeExtensions API
- TimeUnitToSymbolExtensions API
- EnglishArticle API