您的位置: 首页 > IT文章 > 泛型集合两个方法 泛型集合两个方法 分类: IT文章 • 2023-11-22 10:19:31 list.ForEach(t => t.CreateTime = DateTime.Now);//对 System.Collections.Generic.List`1 的每个元素执行指定操作。 list.TrueForAll(t => t.Client != null)//确定是否 System.Collections.Generic.List`1 中的每个元素都与指定的谓词所定义的条件相匹配