Skip to content

Commit 24803d7

Browse files
committed
ThreadSafeDouble.ToString() uses invariant culture
It used to not specify a culture, resutling in the value being different from machine to machine, potentially breaking things. This now makes ThreadSafeDouble_Overrides test pass reliably.
1 parent e2886f1 commit 24803d7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

prometheus-net.shared/Advanced/ThreadSafeDouble.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Globalization;
23
using System.Threading;
34

45
namespace Prometheus.Advanced
@@ -41,7 +42,7 @@ public void Add(double increment)
4142

4243
public override string ToString()
4344
{
44-
return Value.ToString();
45+
return Value.ToString(CultureInfo.InvariantCulture);
4546
}
4647

4748
public override bool Equals(object obj)

0 commit comments

Comments
 (0)