I have a list of structures, where my struct looks like this:
struct coordinate
{
int x;
int y;
}
I want the list sorted initialy by the x value of the struct, and if there are(from the sorted structs) structs with the same x (like coordinate[1].x = coordinate[2].x), sort it then by y. It's possible in C#? I've already sorted them by x
List.Sort((s1, s2) => s1.x.CompareTo(s2.x));
but I dont know how to make the second step. please help :)