| 123456789101112131415161718192021222324252627282930 |
- using System.Globalization;
- namespace MuchInfo.Chart.Infrastructure.Helpers
- {
- public class XMLHelp
- {
- public XMLHelp()
- {
- }
- 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);
- }
- }
- }
|