Converts a String to a Currency with the default format.
[Visual Basic] Overloads Public Shared Function Parse( _ ByVal s As String _ ) As Currency [C#] public static Currency Parse( string s ); [C++] public: static Currency Parse( String* s ); [JScript] public static function Parse( s : String ) : Currency;
The Currency value of the string.
Exception Type | Condition |
---|---|
ArgumentNullException | If The string is null. |
FormatException | If the string is not of the correct format. |
OverflowException | If the string represents a number that is outside the expected range. |
The Parse method converts (parses) a string to a Currency.
This method obtains a NumberFormatInfo object from the locale of the current thread.
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.An overflow exception is thronw if the string represents a number that is less than MinValue or greater than MaxValue.
Currency Structure | Currency Members | System Namespace | Currency.Parse Overload List