CSharp examples for System:Double
Convert String to Double Value Or Zero
using System.Text; using System.IO;//ww w.java 2 s. c o m using System.Globalization; using System.Collections.Generic; using System; public class Main{ public static double DoubleValueOrZero(this string value) { double result; if (double.TryParse(value, out result)) { return result; } else { return 0; } } }