summaryrefslogtreecommitdiff
path: root/lib/netstd
diff options
context:
space:
mode:
authorJens Geyer <jensg@apache.org>2022-09-23 16:25:48 +0200
committerJens Geyer <jensg@apache.org>2022-09-23 17:46:01 +0200
commit443412debc0bc0cf833cdedf7fa296680ce6537a (patch)
treefeeee4ccfedb3d0b3a80465d32a449199f40ffc3 /lib/netstd
parent4748f3ba4fad4900c5fdfcbfc3bb10709d714d97 (diff)
downloadthrift-443412debc0bc0cf833cdedf7fa296680ce6537a.tar.gz
THRIFT-5639 ToString() should use InvariantCulture
Client: netstd Patch: Jens Geyer
Diffstat (limited to 'lib/netstd')
-rw-r--r--lib/netstd/Thrift/Protocol/ToString.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/netstd/Thrift/Protocol/ToString.cs b/lib/netstd/Thrift/Protocol/ToString.cs
index 50dd6df6d..ae69d1cb9 100644
--- a/lib/netstd/Thrift/Protocol/ToString.cs
+++ b/lib/netstd/Thrift/Protocol/ToString.cs
@@ -18,6 +18,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
+using System.Globalization;
using System.Text;
using Thrift.Protocol;
@@ -71,9 +72,13 @@ namespace Thrift.Protocol
{
sb.Append((self as TBase).ToString());
}
+ else if (self is double)
+ {
+ sb.Append(((double)self).ToString(CultureInfo.InvariantCulture));
+ }
else
{
- sb.Append(self != null? self.ToString() : "<null>");
+ sb.Append(self != null ? self.ToString() : "<null>");
}
}
}