Question What's TreeHelper to Generate a Tree in a webForm?

DARK__FOXX

Member
Joined
Sep 2, 2020
Messages
16
Programming Experience
Beginner
Hi,
I follow this walkthrough to build a Tree from a List in NET (link) and I don't understand this line:

IList<Category> topLevelCategories = TreeHelper.ConvertToForest(GetListFromDatabase());
I search on Web if there is a correspondence in VB.NET but I didn't find.
If not, how can I create a tree from a list?
 
That TreeHelper class is something written by the author of that article. It says right there:
The TreeHelper utility class contains numerous other useful methods - such as GetDepth and HasHierarchyLoop - and iterators - such as DepthFirstTraversal, BreadthFirstTraversal, ClimbToRoot, FromRootToNode, and Siblings.

Check out the fully-documented source code for the full details.
Did you check out the fully-documented source code for the full details? Given that just about the entire .NET Framework is written in C#, it's not a problem that that class is written in C#. Just as always, a .NET library is a .NET library, no matter what language it was written in. If you compile that class into a library then you can reference it in a VB project. If you want the equivalent code in VB for whatever reason, it's up to you to convert it yourself. You can write it all by hand if you want or you can use a converter to do some/all of the work. If you go the converter route, I recommend Instant VB from Tangible Software Solutions. It's the best I've encountered and the free version is enough for most people.
 
That TreeHelper class is something written by the author of that article. It says right there:

Did you check out the fully-documented source code for the full details? Given that just about the entire .NET Framework is written in C#, it's not a problem that that class is written in C#. Just as always, a .NET library is a .NET library, no matter what language it was written in. If you compile that class into a library then you can reference it in a VB project. If you want the equivalent code in VB for whatever reason, it's up to you to convert it yourself. You can write it all by hand if you want or you can use a converter to do some/all of the work. If you go the converter route, I recommend Instant VB from Tangible Software Solutions. It's the best I've encountered and the free version is enough for most people.
Thanks to reply!!
I hadn't gotten to the bottom of the article yet. My Fault :cry:
 
Back
Top