Why does Parallel.ForEach change the culture of its threads?
问题 Today I came across a strange phenomenon I can't really explain. There's a webpage with a number of rows in a gridview, which need to be saved to the database and to an XML file one by one. I ended up using a Parallel.ForEach , as there is no relation between the rows, so they can be executed independently. The code is basically this: Parallel.ForEach(gvWithData.Rows.Cast<GridViewRow>(), row => { if (row.RowType == DataControlRowType.DataRow) { // do some logic and stuff... var type = new