.NET Core / .NET Standard标准库中,命名空间System.Collections.Generic
中,一些类是通过包System.Collections
分发的。本文分析了该包中不那么基础又有点令人混淆的SortedDictionary
、SortedList
和SortedSet
这三个类,并对有些相似的SortedList
和SortedSet
进行了一些性能对比。
System.Collections
包的源代码位于https://github.com/dotnet/runtime/tree/master/src/libraries/System.Collections。