NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Currency.Parse (String)

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;

Parameters

s
The string to convert to a Currency.

Return Value

The Currency value of the string.

Exceptions

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.

Remarks

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.

See Also

Currency Structure | Currency Members | System Namespace | Currency.Parse Overload List