Continuing in our weekly blog post series that highlights a few of the new additions to the Framework Design Guidelines 2 nd edition .. This content is found in the LINQ section of Chapter 9: Common Design Patterns. Supporting LINQ through IEnumerable<T> DO implement IEnumerable<T> to enable basic LINQ support. Such basic support should be sufficient for most in-memory data sets. The basic LINQ support will use the extension methods on IEnumerable<T> provided in the .NET Framework. For example, simply defineing as follows: public class RangeOfInt32s : IEnumerable<int> { public IEnumerator<int> GetEnumerator() {…} IEnumerator IEnumerable.GetEnumerator() {…} } Doing so Allows...(read more) ...
Go to the complete details ...