Is there any builtin stable sort routine and swap function in .NET?
问题 Is there any in-built stable sort routine in .NET? I know that C++ has an in-built sort routine under "algorithms" std::sort() . Likewise, do we have something to use along with C#? Also, is there any in-built swap function in .NET? 回答1: Using "C# stable sort" in Google revealed this SO post as top result: Is the sorting algorithm used by .NET's `Array.Sort()` method a stable algorithm? So the answer is: Enumerable.OrderBy is a stable sort function, not built into C#, but part of the .NET