Converts localized decimal number words into System.Decimal values.
public interface IWordsToDecimalNumberConverterConverts words into a decimal value.
decimal Convert(string words);words System.String
The localized decimal number phrase to convert.
System.Decimal
The parsed decimal value.
System.ArgumentNullException
If words is null.
System.FormatException
If words is malformed or outside the supported System.Decimal range.
System.NotSupportedException
If decimal word parsing is not supported for the converter's locale.
Attempts to convert words into a decimal value.
bool TryConvert(string words, out decimal parsedValue);words System.String
The localized decimal number phrase to convert.
parsedValue System.Decimal
When this method returns, contains the parsed value if successful; otherwise, zero.
System.Boolean
true if the phrase was parsed successfully; otherwise, false.
Attempts to convert words into a decimal value and reports the first unrecognized token when parsing fails.
bool TryConvert(string words, out decimal parsedValue, out string? unrecognizedNumber);words System.String
The localized decimal number phrase to convert.
parsedValue System.Decimal
When this method returns, contains the parsed value if successful; otherwise, zero.
unrecognizedNumber System.String
When parsing fails, the best-effort unrecognized token or phrase.
System.Boolean
true if the phrase was parsed successfully; otherwise, false.