摘要:
LINQ扩展方法执行时,应用程序不会真正构建集合,只有在遍历集合的时候(使用 foreach)才会对集合进行枚举。static void DoWork() { Tree<Employee> empTree = new Tree<Employee>(new Employee { Id = 1, FirstName = "Janet", LastName = "Gates", Department = "IT"}); empTree.Insert(new Employee { Id =... 阅读全文