-
-
Save wickedshimmy/1690202 to your computer and use it in GitHub Desktop.
Fun Friday Algorithm!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new[] { | |
new DateTime (2012, 01, 01, 13, 0, 0), | |
new DateTime (2012, 01, 01, 9, 0, 0), | |
new DateTime (2012, 01, 02, 1, 0, 0), | |
new DateTime (2012, 01, 02, 23, 10, 0), | |
}.OrderBy (dt => dt.Date) | |
.ThenByDescending (dt => dt); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Save the grouping/bind operations;
ThenBy
only operates within equivalent ordering classes to begin with.