I have a List<Points>()
and I want to sort it with a custom comparer function.
I made:
public int MyCompare(Point p1, Point p2)
{
...
}
// In my main
// ...
points_.Sort(MyCompare);
// ...
I works, all right.
Now I want to sort everything but the first element, so I thought to do:
points_.Sort(1, points_.Count()-1, MyCompare);
But with this overload he wants as argument an IComparer.
How can I solve this?
Note that Point
is not a custom class, it is from Xna framework. I don't want to implement a custom class with : IComparer