linq foreach c#
sequence.Where(x => x.Name.ToString().Equals("Apple"))
.ToList()
.ForEach( x =>
{
if(someCondition)
{
// Do some stuff here.
}
});
4.33
3
items.ToList().ForEach(i => i.DoStuff());
Thank you!
3
0
4
1
someValues.ToList().ForEach(x => list.Add(x + 1));
Thank you!
1
0
Are there any code examples left?
New code examples in category C#