ExtensionMethod.NET Home of 880 C#, Visual Basic, F# and Javascript extension methods
Convert string to decimal
public static decimal ToDecimal(this string value) { decimal number; Decimal.TryParse(value, out number); return number; }
string number = "1.2"; decimal converted = number.Decimal();
Author: Túlio Henrique Thomé
Submitted on: 17 mei 2011
Language: C#
Type: System.String
Views: 7946