Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IEnumerable<T>.OrderBySelf() #28

Open
colinangusmackay opened this issue Nov 29, 2022 · 1 comment
Open

IEnumerable<T>.OrderBySelf() #28

colinangusmackay opened this issue Nov 29, 2022 · 1 comment

Comments

@colinangusmackay
Copy link
Member

colinangusmackay commented Nov 29, 2022

It can be common to simply order a result by itself. e.g.

int[] a = new[] {1, 5, 9, 2, 4, 3, 7, 8, 0};
var ordered = a.OrderBy(b => b);

Could collapse this into an OrderBySelf() with a variants that order descending, and variants that take an IComparer. Also the ThenBy/ThenByDescending variants too.

@colinangusmackay
Copy link
Member Author

Maybe just .Ordered() or .OrderedDescending()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant