Book Image

Hands-On Functional C# [Video]

By : Georgi Parlakov
Book Image

Hands-On Functional C# [Video]

By: Georgi Parlakov

Overview of this book

<p>When C# programs get more complex, they become hard to understand, and as a result are much harder to maintain. We suggest a few approaches from Functional Programming to resolve this and make the code readable, reusable, testable and structured.</p> <p><span id="description" class="sugar_field">This course will present some basic Functional Programming ideas and suggest how to make use of the functional features of C# in your everyday work. As C# is deeply object-oriented by design, we'll concentrate on the bits of Functional Programming that are easily applicable to it—such as LINQ, pure functions, and dot-chaining (aka composability). We won't explore functional terms such as monads and functors in too much detail; rather we provide examples of real C# using functional features. You'll improve the maintainability and testability of your application and gain the confidence to start a new project with Functional Programming paradigms.</span></p> <p><span id="description" class="sugar_field">All the code and supporting files for this course are available at: <a style="font-weight: normal;" href="https://github.com/PacktPublishing/Hands-on-Functional-C-sharp" target="_new">https://github.com/PacktPublishing/Hands-on-Functional-C-sharp</a></span></p> <h1>Style and Approach</h1> <p>A comprehensive course packed with practical examples and helpful advice on getting started with exploring different Functional Programming features in C#. This course is divided into clear chunks so you can learn at your own pace and focus on your own area of interest.</p>
Table of Contents (7 chapters)
Chapter 4
Extending LINQ
Content Locked
Section 3
Port a Method to LINQ Extension
We will describe a recipe that has the steps required to transform a method into an extension method to LINQ. We’ll demonstrate that with two methods: one in static and one in non-static class. One is specific and one generic. - Show the methods before their transformation - Show the recipe and follow the steps - Conclude that the recipe is applicable to IEnumerable and any other type