Error!
Success!

Eliminating ToList().ForEach() by TDD and Extensions Methods

0
kicks

Eliminating ToList().ForEach() by TDD and Extensions Methods  (Unpublished)

Following "Program to an interface, not an implementation", you should use IList instead of List. However, you then lose access to some great delegate methods of the List class (e.g. ForEach, ConvertAll). In order to use them you have to first call ToList(). In this post I will use Test Driven Development (TDD) to add these as extension methods to the generic IEnumerable interface, elimintating the need to call ToList().


Kicked By:
Drop Kicked By: