From the course: Advanced C#: Functional Programming Patterns

Unlock this course with a free trial

Join today to access over 24,500 courses taught by industry experts.

Pipelining with IEnumerable

Pipelining with IEnumerable

When Microsoft was creating the functional parts of .NET and C#, they also implemented LINQ which is called Language Integrated Query, and it's a great example of how to think about building functional code in C# and .NET. So I encourage you to look at that to get some ideas. And I'm going to take some of the ideas from LINQ and build them into this demo. So what I'm doing is I'm continuing with the demo I showed you in the last video, which is where I took and operationalized with generics and extension methods and lambdas, those mathematical functions. So I'm going to do the same thing, but instead of working with single values like ints and doubles, we're going to work with IEnumerable< T >. So the idea is you have a group of data and then you can filter that data, reorder that data, perform operations on that data, and return subsets of the data. My code is in this extensions class, and we're going to be pipelining. So what do we know about pipelines? The first parameter of the…

Contents