Is there a C# equivalent to C++ std::partial_sort?

前端 未结 3 778
孤城傲影
孤城傲影 2021-02-05 20:06

I\'m trying to implement a paging algorithm for a dataset sortable via many criteria. Unfortunately, while some of those criteria can be implemented at the database level, some

3条回答
  •  情歌与酒
    2021-02-05 20:41

    Array.Sort() has an overload that accepts index and length arguments that lets you sort a subset of an array. The same exists for List.

    You cannot sort an IEnumerable directly, of course.

提交回复
热议问题