, foreach:
foreach(People p in someList)
{
p.Save();
}
- LINQ, , .Select(...) IEnumerable/IQueryable, , -.
, , , IEnumerable/IQueryable. , :
someList.Select(person => person.Save()).Count();
, Save() -void.
:
, List < > , :
someList.ForEach(person => person.Save());
share