Back to Devexpress

NumberInWords Class

officefileapi-devexpress-dot-docs-dot-text-cfc4ee7c.md

latest2.0 KB
Original Source

NumberInWords Class

Provides access to static properties used to obtain a provider that converts numbers to words.

You need an active DevExpress Office File API Subscription or DevExpress Universal Subscription to use these methods in production code.

Namespace : DevExpress.Docs.Text

Assembly : DevExpress.Docs.v25.2.dll

NuGet Package : DevExpress.Document.Processor

Declaration

csharp
public static class NumberInWords
vb
Public Module NumberInWords

Remarks

Use the NumberInWords.Ordinal property to obtain a word representing a number in sequential order, and the NumberInWords.Cardinal property to obtain a word representing a natural number.

The following code snippet obtains two strings - “Five hundred sixty-eighth” and “Fünfhundertachtundsechzigste” for the value of 568.

csharp
using DevExpress.Docs.Text;
//...
string textEnglish = NumberInWords.Ordinal.ConvertToText(568);
string textGerman = NumberInWords.Ordinal.ConvertToText(568, NumberCulture.German);
vb
Imports DevExpress.Docs.Text
'...
Private textEnglish As String = NumberInWords.Ordinal.ConvertToText(568)
Private textGerman As String = NumberInWords.Ordinal.ConvertToText(568, NumberCulture.German)

Inheritance

Object NumberInWords

See Also

NumberInWords Members

DevExpress.Docs.Text Namespace