Write decimals in international format

No warning on #RESOLUTION tag
This commit is contained in:
Flamefire committed 2013-10-14 21:55:26 +02:00
1 parent d41779b6f2
commit 1702859e79
4 files changed
+27 -21

No files matched your search

+11
View File
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
@@ -97,5 +98,15 @@ namespace VocaluxeLib
value = value.Substring(start, end - start + 1);
return value;
}
/// <summary>
/// Converts value to a string in fixed point notation using invariant formating (english style decimal point)
/// </summary>
/// <param name="value">Value to be converted</param>
/// <returns>String representation of value</returns>
public static string ToInvariantString(this float value)
{
return value.ToString("F", NumberFormatInfo.InvariantInfo);
}
}
}