I’m trying to make a tree with C#. Many posts advise using a linked list, like the LinkedList class on MSDN that is a part of the .NET framework. But it seems like each MSDN LinkedListNode can only link to one child node (in that case the list would look like a line, not like the branching tree I’m shooting for). Am I missing something? There was another post on this, and people advised the poster to just build his own version of what seems to be called a multilinked list ( How to create multiple nodes in a linked list then iterate through the nodes )
Is it time to cut loose from the mothership and try making my own tree? Should I make a new multi-linked node class that inherits from LinkedListNode?
There are no trees in the standard class libraries. You need to write your own, or find someone else’s implementation that you can use.
I don’t think you’d gain anything by inheriting from
LinkedListNode<T>. The semantics are different.