if (row[column] is double)
{
//properly deal with rational numbers - ALWAYS use the same (english - culture invariant) numbering format rules - otherwise data will differ between cultures
//for example, portuguese uses , as thousand separator, while english uses a dot. This causes mySql to calculate different values form SUM(myColumn).
var d = Convert.ToDouble(row[column]);
value = d.ToString(CultureInfo.InvariantCulture);
}
{
//properly deal with rational numbers - ALWAYS use the same (english - culture invariant) numbering format rules - otherwise data will differ between cultures
//for example, portuguese uses , as thousand separator, while english uses a dot. This causes mySql to calculate different values form SUM(myColumn).
var d = Convert.ToDouble(row[column]);
value = d.ToString(CultureInfo.InvariantCulture);
}
No comments:
Post a Comment