I was wondering about the order that a foreach loop in C# loops through a System.Collections.Generic.List
object.
I found another question abou
I've just had to do something similar as a quick hack of code, though it didn't work for what I was trying to do it did reorder the list for me.
Using LINQ to change the order
DataGridViewColumn[] gridColumns = new DataGridViewColumn[dataGridView1.Columns.Count];
dataGridView1.Columns.CopyTo(gridColumns, 0); //This created a list of columns
gridColumns = (from n in gridColumns
orderby n.DisplayIndex descending
select n).ToArray(); //This then changed the order based on the displayindex