测试

泛型集合两个方法

list.ForEach(t => t.CreateTime = DateTime.Now);//对 System.Collections.Generic.List`1 的每个元素执行指定操作。
list.TrueForAll(t => t.Client != null)//确定是否 System.Collections.Generic.List`1 中的每个元素都与指定的谓词所定义的条件相匹配

  

 

posted @ 2018-05-29 21:17  C#的麦香园  阅读(174)  评论(0编辑  收藏  举报
测试