Answer the question
In order to leave comments, you need to log in
How to represent the hierarchy of elements?
What is the best way to represent a set of objects (of different types) that
are nested inside each other? Can move to a higher level of the hierarchy, collapse
by certain properties, filter ...
Answer the question
In order to leave comments, you need to log in
class Obj { }
class Collection : Obj
{
private List<Obj> items;
}
class Item : Obj { }
it is not entirely clear what is meant by "different types", usually a hierarchy of elements is not built from anything, the simplest case is a class of the form
class Item{
public Item Parent;
public Object Data;
public List<Item> Childs;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question