Send feedback on this topic.
Teradata.Client.Provider
Parse(String) Method



Teradata.Client.Provider Namespace > TdDecimal Structure > Parse Method : Parse(String) Method
The numeric string that is to be converted to a TdDecimal.
Converts the String representation of a number to its TdDecimal equivalent.
Syntax
'Declaration
 
Public Overloads Shared Function Parse( _
   ByVal input As String _
) As TdDecimal
'Usage
 
Dim input As String
Dim value As TdDecimal
 
value = TdDecimal.Parse(input)
public static TdDecimal Parse( 
   string input
)
public:
static TdDecimal Parse( 
   String^ input
) 

Parameters

input
The numeric string that is to be converted to a TdDecimal.

Return Value

The TdDecimal representation of the specified numeric string
Exceptions
ExceptionDescription
The format of the numeric string is invalid.
The specified numeric string could not be converted to a TdDecimal
The numeric string is null.
Remarks

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.

Requirements
ProductVersionsPlatforms
.NET2.1, 3.1, 6Windows, Linux, MacOS
.NET Framework4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8Windows
.NET Standard2.0Windows, Linux, MacOS
See Also

Reference

TdDecimal Structure
TdDecimal Members
Overload List