Nice & universal way to convert List of items to Tree
If you want to have universal method you”ll need an additional class: public class TreeItem<T> { public T Item { get; set; } public IEnumerable<TreeItem<T>> Children { get; set; } } Then use it with this helper: internal static class GenericHelpers { /// <summary> /// Generates tree of items from item list /// </summary> /// … Read more