【发布时间】:2018-11-12 02:08:36
【问题描述】:
我有一个名为以下类型的项目列表
public class ABC
(
string itemName{get;set;}
int parentID{get;set;}
List<ABC> Child {get;set;}
)
所以Class ABC 显示列表项可以有List<ABC> Child,而List<ABC> Child 可以有另一个List<ABC> Child。
这是问题;
如果我想添加 Class ABC 类型的新项目以列出项目,我如何确保它不在项目列表或其内部子列表中,然后将其添加到项目列表或其任何内部子列表中?
最好的问候
【问题讨论】:
标签: c# asp.net asp.net-mvc linq asp.net-mvc-4