I am using Net core 6.0 and using DataSet and GetXml() function to convert datase into string. However, some values are being processed in correctly. For example, the value 56.45533 is getting converted to 56.455329999999996 after going through GetXml().
Does anyone know what could I do as a workaround for this? Also, since this clearly looks like a bug in GetXml() function, what would be the correct place to report the issue to Microsoft? Below is my code -
DataSet ds = new DataSet();
DataTable dt = new DataTable("Forecast");
dt.Columns.Add(new DataColumn("lat", typeof(double)));
DataRow dr1 = dt.NewRow();
DataRow dr2 = dt.NewRow();
DataRow dr3 = dt.NewRow();
DataRow dr4 = dt.NewRow();
DataRow dr5 = dt.NewRow();
dr1["lat"] = 56.45533;
dt.Rows.Add(dr1);
dr2["lat"] = 59.67768;
dt.Rows.Add(dr2);
dr3["lat"] = 534.64568;
dt.Rows.Add(dr3);
dr4["lat"] = 56.45533;
dt.Rows.Add(dr4);
dr5["lat"] = 534.47755;
dt.Rows.Add(dr5);
var temp = ds.GetXml();
The value of temp variable while debugging is as seen in the screenshot.
