I have been trying to create a tree structure similar to that of a treeview but with proprietary methods and properties.
I have seen a number of examples on how to do a binary tree but I am looking for something closer to a regular tree i.e many nodes of each branch, each possibly having many more nodes and so on.
Performance isn't that crucial since the trees will in most cases have less than 10 nodes.
Apart from methods to add new nodes, count and index (as seen in collectionbases), I could do with each node having parentnode,lastchild,firstchild properties and a means of finding a node anywhere in the tree and a means of listing all nodes whatever level they are at. I see that XML also accommodates these kinds of routines although I wanted something more strongly typed and that would allow derived classes of a base class to exist as the nodes.
I realise this is quite a broad question and it would be expecting a lot from an expert to conjure something up as an answer but perhaps somebody out there has already seen or used a structure that would support this and can suggest or point to similar examples.
I am only competent in VB but I can always try and convert a c# solution using online converters if these are the only examples available.
Thank you in advance!