相关疑难解决方法(0)

在 C# 中将树排序为列表

我有一个 C# 实体列表。我的实体定义如下:

public class Item
{
    // the id of an item
    public Guid ID { get; set; }

    // if this is a child item, the ParentID is the ID of the item that
    // this item is a child of
    public Guid? ParentID { get; set; }

    // If this item does not have a parent, this should be 0.
    // Otherwise if it is a child, a level=1
    // If it is a grandchild, level=2, etc. …
Run Code Online (Sandbox Code Playgroud)

c#

4
推荐指数
1
解决办法
2746
查看次数

标签 统计

c# ×1