XmlConvert.ToDecimal(String) Method

Definition

Converts the String to a Decimal equivalent.

public:
 static System::Decimal ToDecimal(System::String ^ s);
public static decimal ToDecimal (string s);
static member ToDecimal : string -> decimal
Public Shared Function ToDecimal (s As String) As Decimal

Parameters

s
String

The string to convert.

Returns

A Decimal equivalent of the string.

Exceptions

s is not in the correct format.

s represents a number less than Decimal.MinValue or greater than Decimal.MaxValue.

Applies to