Possible Duplicate:
is there a .Each() (or .ForEach() ) iterator in the .Net standard library?
Maybe I am wrong, but I don't see the "EACH" function in .net (3.0)?
We can
IEnumerable<T>.Select().Where().First().Any()
Why don't we have
IEnumberable<T>.Each(Action<T> action)
?
So instead of 2 lines:
Foreach(T t in list)
action(t)
;
we can just call
list.Each((t)=>{blah;blah;})
?
Is there a concern for performance?