using System.Globalization; namespace MuchInfo.Chart.Infrastructure.Helpers { public class ConvertHelper { public static float ParseSingle(string txt) { string text = txt.Replace(",", "."); return float.Parse(text, CultureInfo.InvariantCulture.NumberFormat); } public static double ParseDouble(string txt) { string text = txt.Replace(",", "."); return double.Parse(text, CultureInfo.InvariantCulture.NumberFormat); } public static string NumToString(float aNum) { return aNum.ToString(CultureInfo.InvariantCulture.NumberFormat); } public static string NumToString(double aNum) { return aNum.ToString(CultureInfo.InvariantCulture.NumberFormat); } } }