int a = 0; List<string> aaa = new List<string>(){ "aaa", "bbb" }; aaa.ForEach(s => a += s.Length); //等价于aaa.ForEach(new Action<string>((s) => a += s.Length)); list.ForEach(m=>m.Id=NextId())