ForEach for IEnumerable
Code Snippet, Misc December 11th, 2008
My Technobabble : ForEach, a simple but very useful extension method
This evening I was writing some code (Yay!) for an Xml based MEF catalog I am prototyping. I came across the need to invoke a set of methods on an IEnumerablethat was returned from a LINQ to XML query. Unfortunately no such animal exists on IEnumerable.
This came in very useful, thanks Glenn – basically, I needed a ForEach to handle some lamda’s, on a Stack<T>, and this was very useful!


Recent Comments