I\'m porting some C++ code to C#.
Does C# have an equivalent to std::nth_element() or do I need to roll my own?
No, it doesn't. You'll have to write the selection algorithm (preferrably quick select) by hand.