c# - foreach vs LINQ .ForEach() -



c# - foreach vs LINQ .ForEach() -

this question has reply here:

why foreach method on list<t> collection? [duplicate] 4 answers

why linq .foreach require list object, while foreach statement requires ienumerable?

i prefer using foreach when having multiple lines , linq single line statements - readability.

but preferred, , why? , why difference?

there no linq foreach() method. method looking @ a fellow member of list<t>.

see here give-and-take on why linq/ienumerable doesn't have foreach().

c# linq foreach

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -