CSharp examples for System:String Number
String As Decimal
using System;//from www . j av a 2 s . c o m public class Main{ public static Decimal AsDecimal( this string str, Decimal defaultValue = default(Decimal)) { Decimal value; return Decimal.TryParse(str, out value) ? value : defaultValue; } }