Converts a specified String to a Decimal.
[Visual Basic] Overloads Public Shared Function Parse( _ ByVal s As String _ ) As Decimal [C#] public static Decimal Parse( string s ); [C++] public: static Decimal Parse( String* s ); [JScript] public static function Parse( s : String ) : Decimal;
The Decimal value of the string.
Exception Type | Condition |
---|---|
FormatException | If the string is not of the correct format. |
OverflowException | If the string represents a number that is less than Decimal.MinValue or greater than Decimal.MaxValue. |
The string must consist of an optional minus sign ("-") followed by a sequence of digits ("0"- "9"). The sequence of digits may optionally contain a single decimal point (".") character.
Leading and trailing white space characters are ignored.
Decimal Structure | Decimal Members | System Namespace | Decimal.Parse Overload List