Why is TreeSet<T> an internal type in .NET?

Posted by Justin Niessner on Stack Overflow See other posts from Stack Overflow or by Justin Niessner
Published on 2010-03-16T14:50:53Z Indexed on 2010/05/08 23:38 UTC
Read the original article Hit count: 238

So, I was just digging around Reflector trying to find the implementation details of HashSet (out of sheer curiosity based on the answer to another question here) and noticed the following:

internal class TreeSet<T> : ICollection<T>, IEnumerable<T>, ICollection,
    IEnumerable, ISerializable, IDeserializationCallback

Without looking too deep into the details, it looks like a Self-Balancing Binary Search Tree.

My question is, is there anybody out there with the insight as to why this class is internal? Is it simply because the other collection types use it internally and hide the complexities of a BST from the general masses...or am I way off base?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about collections