Utils.ListToTree<T>(IList<T>) Method

Converts list to tree structure with one root.

Namespace: Gamanet.C4.SimpleInterfaces
Assembly: Gamanet.C4.SimpleInterfaces (in Gamanet.C4.SimpleInterfaces.dll) Version: 2026.0.0.242
Syntax
C#
public static TreeNode<T> ListToTree<T>(
	IList<T> list
)
where T : ISimpleEntity

Parameters

list  IList<T>
The list.

Type Parameters

T
simple entity

Return Value

TreeNode<T>
Root node of tree
Exceptions
ExceptionCondition
InvalidOperationExceptionMissing entity which have ParentId: '{rootId}
See Also

Reference

Utils Class
ListToTree Overload
Gamanet.C4.SimpleInterfaces Namespace