I see a problem in an ASP.NET production application that includes the following code, which is used to render the geo-coordinates of a specific object:
private double _longitude;
private double _latitude;
public string ToCsvString()
{
return _latitude + "," + _longitude;
}
Thread.CurrentThread.CurrentCulture will be set to different values ββbased on the incoming request. The behavior that I see is that the result of this function will depend on the threadlocal culture. From time to time, decimal points and commas are incorrect for the current crop. More strange, it seems that once erroneously, the wrong value is saved.
Does ToString have double cache values?
source
share