I been experimenting with the different methods for representing a hierarchical structures in memory that would allow for simple and efficient transversal both up and down to discover ancestor and descendant relationships. Does anyone have any suggestions or examples of the options that I have? Is there a collection type in .Net 3.5 that would help here?
Thanks David, that looks very promising.
Stephen franklin
2008-12-04 22:05:52
A:
How about making your own node that looks something like:
class Node<T> {
public T Item;
public LinkedList<T> Children;
}
Then apply Node recursively, as needed
GregUzelac
2008-11-30 22:24:31
A:
I use LINQ to traverse hierarchical structures that I loaded from XML web services but I bet LINQ would generalize nicely to walk around your tree collection.
-Mike
PS. I mention this because LINQ is just plain fun too.
Mike Bonnell
2009-02-23 02:05:30