Answer the question
In order to leave comments, you need to log in
How to call an arbitrary method on each element of a set in linq style?
The help of the person who is well familiar with linq is necessary. I have:
IEnumerable<Sometype1> clist = GetC();
// ...
// каждый элемент clist содержит множество slist
// ...
IEnumerable<Sometype2> slist = с.GetS();
var querry = GetC().SelectMany(
c => { A(c, pass); return c.GetS(); },
(el_c, s) => { T(el_c,s); return s; });
var querry = from c in GetC()
from s in /*перед этим вызовом должен быть А(c, pass)*/ c.GetS()
/*и где-то тут нужно как-то вызвать T(c,s)*/
select s;
Answer the question
In order to leave comments, you need to log in
Call the c void method as a return value:
PS As for aesthetics, the problem is in the naming of variables and methods. If you call it normal, it will be read well and understandably.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question