Hi, I have a List<data> which i am trying to loop and pass it to some function.IEnumerable<EntityObject> Data = entity.get();LstAll = new Employee(); foreach (EntityObject o in Data){ Employee e = new Employee(); DeleteData(0,e); LstAll.Add(e);}now i want to use lamba expression so that i can remove the Foreach loop and call the DeleteData.LstAll.Add(from o in Data let c = DeleteData(o,Employee e)); This code is giving me error.Any suggestion Plz help.[Edit: Code block added] 解决方案 这篇关于Lamba Expression用于调用方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-28 18:48