learner58130
12
Q:

foreach c# linq example

items.ToList().ForEach(i => i.DoStuff());
1
someValues.ToList().ForEach(x => list.Add(x + 1));
1
sequence.Where(x => x.Name.ToString().Equals("Apple"))
    .ToList()
    .ForEach( x =>
     {
       if(someCondition)
       {
         // Do some stuff here.
       }  
     });
1

New to Communities?

Join the community