Why Would I Create A Custom LINQ Operator?
Posted by: K. Scott Allen,
on 13 Feb 2009 |
View original | Bookmarked: 0 time(s)
Here are three different reasons: For an operation that doesnt exist. For readability. For performance. An example for reason #1 is Bart De Smets ForEach operator. While you are on Barts blog, you can read about the pros and cons of a ForEach in his comments. An example for reason #2 would be a custom join operator. Lets say we are joining an object collection of employees to an object collection of departments. var employeeAndDepartments =
employees.Join(departments,
employee...