ToDecimal
public static decimal ToDecimal(this string value) { decimal number; Decimal.TryParse(value, out number); return number; }Example:
string number = "1.2"; decimal converted = number.Decimal();
Description
Convert string to decimal
Details
- Author: Túlio Henrique Thomé
- Submitted on: 17-5-2011 20:57:00
- Language: C#
- Type: System.String
- Views: 4135
Double click on the code to select all.