tag:blogger.com,1999:blog-3339062625442125125.post9050013038237579870..comments2023-06-18T12:19:43.363+01:00Comments on Andrea Angella, Software is my passion.: The Command Pattern in .NETAnonymoushttp://www.blogger.com/profile/16030164472457151873noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-3339062625442125125.post-21916358174060932922012-11-04T15:15:46.949+00:002012-11-04T15:15:46.949+00:00It was not the point of the discussion and I didn&...It was not the point of the discussion and I didn't pay much attention to it. You are right. Thanks for the catchAnonymoushttps://www.blogger.com/profile/16030164472457151873noreply@blogger.comtag:blogger.com,1999:blog-3339062625442125125.post-77247788984457588492012-11-04T11:39:19.270+00:002012-11-04T11:39:19.270+00:00Hi Andrea,
in the Where extension method you coll...Hi Andrea,<br /><br />in the Where extension method you collect data into a List but in this way you have break the enumerator's flow. Consider the use of "yield return" like this:<br /><br />foreach(var element in source)<br /> if (predicate.Predicate(element))<br /> yield return element;<br />Matteo Baglinihttp://www.makesimple.netnoreply@blogger.com