Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit e479507b authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

culture-independent decimal separator for writing SI values to XML format

parent fb4373e8
No related branches found
No related tags found
No related merge requests found
......@@ -2295,7 +2295,7 @@ namespace TUGraz.VectoCommon.Utils
public string ToXMLFormat(uint? decimals = null)
{
decimals = decimals ?? 2;
return Val.ToString("F" + decimals.Value);
return Val.ToString("F" + decimals.Value, CultureInfo.InvariantCulture);
}
public class EqualityComparer<T> : IEqualityComparer<T> where T : SI
......@@ -2306,6 +2306,7 @@ namespace TUGraz.VectoCommon.Utils
{
_precision = precision;
}
public bool Equals(T x, T y)
{
return x.IsEqual(y.Value(), _precision);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment