I want to create a completely generic treeview like structure. some thing like this:
public class TreeView<T, K, L>
{
public T source;
public K parent;
public List<L> children;
}
as you can see in this class source, parent and also the children, all have a different generic data type. also i want my tree view to have unlimited number of levels (not just 3). this way when i want to work with my nodes in the code, all of them are going to be strongly typed. not just objects that i need to convert them to their original type.
is it possible to create this kind of structure in c#, a treeview which all of its nodes are strongly typed?
thanks