C
Join ServerC#
help
❔ Sort a list
TTheMasterPvp7911/18/2022
how would sorting a list of object[] work with this:
outputResults.Sort((a, b) => a.CompareTo(b));
Ccoffeeadikt11/20/2022
Depends on what the sort rules are for the data types of a and b.
Ccoffeeadikt11/20/2022
I'm a little unclear about what you're asking. This may give a little more detail:
https://stackoverflow.com/questions/925471/sorting-a-list-of-objects-in-c-sharp
https://stackoverflow.com/questions/925471/sorting-a-list-of-objects-in-c-sharp
Ccoffeeadikt11/20/2022
This gives another perspective on writing a custom comparer that you can use when sorting a list of Object
https://www.geeksforgeeks.org/how-to-sort-object-array-by-specific-property-in-c-sharp/
https://www.geeksforgeeks.org/how-to-sort-object-array-by-specific-property-in-c-sharp/
AAccord11/22/2022
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.