I'm using IEnumerable orderby to sort my items in ascending format but it does not work my query is like this:
IEnumerable<Step> steps = allsteps.Where(step => step.X <= Y);
steps = steps.OrderBy(step => step.X);
its not deffer to use OrderBy or OrderByDescending
why?
I'm want to use Sum()
method to sum some items and item orders is important (there are some rules)
I'm read in MSDN it should be enumerated to work but whats the good way (i didn't try it).
EDIT: X
and Y
are of type double
.
i'm checked the first item of my steps (steps.First()) in quick watch.