XmlConvert.ToDecimal(String) Metod

Definition

Konverterar String till en Decimal motsvarighet.

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

Parametrar

s
String

Sträng som ska konverteras.

Returer

En Decimal motsvarighet till strängen.

Undantag

s är null.

s är inte i rätt format.

s representerar ett tal som är mindre än Decimal.MinValue eller större än Decimal.MaxValue.

Gäller för