VB.NET equivalent to java.util.TreeSet

我怕爱的太早我们不能终老 提交于 2019-12-10 19:56:29

问题


Is there a VB.NET equivalent to java.util.TreeSet?


回答1:


The closest you'll find is the SortedSet(T) class.




回答2:


Strangely, the .NET FCL does not include tree-bases data structures/collections. You can implement your own though. See here for a C# example (easy enough to convert to VB.NET)

The C5 Library is a well-regarded project that:

... provides the following data structures, described by C# classes: array list, doubly linked list, hash-indexed array list, hash-indexed linked list, hash set, hash bag (multiset), sorted array, wrapped array, tree set, tree bag (multiset), stack, double-ended queue, circular queue, priority queue (interval heap), hash dictionary, and tree dictionary.

C5 is also C#-based but it does come as a DLL so you wouldn't even have to worry about the language. Just reference it in your solution and off you go.




回答3:


There's nothing built-in, but you could use the TreeSet<T> implementation from the C5 library. This sounds as though it's roughly equivalent, although I haven't used it myself.



来源:https://stackoverflow.com/questions/2516517/vb-net-equivalent-to-java-util-treeset

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!