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!

Decimal.Parse (String)

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;

Parameters

s
The string to convert to a Decimal.

Return Value

The Decimal value of the string.

Exceptions

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.

Remarks

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.

See Also

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