摘要: 使用 C# lamda 表达式写的两种递归函数//将一个平行数据,整理为一个树形数据private void Test1(List<myType> allTypeList){ //查找父节点List<myType> rootType = allTypeList.Where(o => o.ParentId == -1).ToList(); //递归主函数Action<myType> addChildType = null;addChildType= (typeInfo => { var childInfo = allTypeList.Where(o 阅读全文
posted @ 2012-08-16 15:49 草青工作室 阅读(387) 评论(0) 推荐(0) 编辑