i got an output from a list into an excel file. To simplefile things it could look like this:
4 1 2 3
Now all i wanna do is, put it in the right order:
1 2 3 4
which i did with this code ( isSort contains 4 1 2 3 ):
...
var isSortFin = new List<Item>();
var FirstElement = isSort.First();
foreach (var Itemd in toSort)
{
if (Itemd.Summary != FirstElement.Summary)
{
isSortFin.Add(Itemd);
}
}
isSortFin.Add(FirstElement);
return isSortFin;
now my output is:
3 2 1 4
and not the aspired:
1 2 3 4
where do i go wrong?