Parameters
- input
- The numeric string that is to be converted to a TdDecimal.
Exception | Description |
---|---|
System.FormatException | The format of the numeric string is invalid. |
System.OverflowException | The specified numeric string could not be converted to a TdDecimal |
System.ArgumentNullException | The numeric string is null. |
The numeric string that is to be converted to a TdDecimal must have the following format:
[white space][sign]digits.[fractional digits][sign][white space]The items in brackets are optional. The sign
can appear at the beginning of the digits or the end. However it cannot appear at both locations. The digits
can also be grouped by a group separator. The number in each group is not checked. However, if a group separator is specified it must be followed by digits. For example,
String | Result |
---|---|
1234562546908.23442 | is a valid string |
1,234,562,546,908.23442 | is a valid string |
1234,562546,9,08.23442 | is a valid string |
+1234562546908.23442 | is a valid string |
1234562546908.23442- | is a valid string |
-1234562546908.23442- | is an invalid string |
1,234,562,546,908, | is an invalid string |
1,234,562,546,908.23,442 | is an invalid string |
Both the group separator and decimal separator are culture specific.
If the input contains the string "NULL" a TdDecimal.Null will be returned.
Target Platforms: Windows 7, Windows 8, Windows 8.1, Windows 10, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2