THRIFT-5639 ToString() should use InvariantCulture

Client: netstd
Patch: Jens Geyer
This commit is contained in:
Jens Geyer 2022-09-23 16:25:48 +02:00
parent 4748f3ba4f
commit 443412debc

View File

@ -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>");
}
}
}