Functional Programming in C# - Part 1
2.0 (3 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
8 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Functional Programming in C# - Part 1 to your Wishlist.

Add to Wishlist

Functional Programming in C# - Part 1

Uncover the secrets of functional programming using C# and change the way you approach your applications forever
2.0 (3 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
8 students enrolled
Created by Packt Publishing
Last updated 4/2017
Current price: $10 Original price: $125 Discount: 92% off
5 hours left at this price!
30-Day Money-Back Guarantee
  • 2 hours on-demand video
  • 1 Supplemental Resource
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Develop an application using the functional approach
  • Implement unit testing to functionally program code
  • Create efficient code using functional programming
View Curriculum
  • To walk through this course and successfully compile all the source code, we need Visual Studio Community 2015 Update 3, .NET Framework 4.6.2, and .NET Core 1.0.
  • This course has been tested on the following system configuration:
  • OS: Windows 7
  • Processor: i5 Forth Gen 3.20 GHz
  • Memory: 8GB
  • Hard Disk Space: 1 TB
  • Video Card: 256MB Video Memory

Functional programming makes your application faster, improves performance, and increases your productivity. C# code is written at a higher level of abstraction, so that code will be closer to business requirements, abstracting away many low-level implementation details.This video bridges the language gap for C# developers by showing you how to create and consume functional constructs in C#. We also bridge the domain gap by showing how functional constructs can be applied in business scenarios. We’ll take you through lambda expressions and extension methods, and help you develop a deep understanding of the concepts and practices of LINQ and recursion in C#.By the end of the video, you will be able to write code using the best approach and will be able to perform unit testing in functional programming, changing how you write your applications and revolutionizing your projects.

About the Authors

Wisnu Anggoro is a Microsoft Certified Professional in C# programming and an experienced C/C++ developer. He has also authored Boost.Asio C++ Network Programming - Second Edition, published by Packt. He has been programming since he was in junior high school and started developing computer applications using the BASIC programming language in the MS-DOS environment. He has a solid experience of smart card programming as well as desktop and web application programming, such as designing, developing, and supporting live use applications for SIM Card Operating System Porting, personalization, PC/SC communication, and other smart card applications that require the use of C# and C/C++. He is currently a senior smart card software engineer at CIPTA, an Indonesian company that specializes in the innovation and technology of smart cards.

Who is the target audience?
  • This video is suitable for C# developers with basic prior knowledge of C# and with no functional programming experience at all.
Students Who Viewed This Course Also Viewed
Curriculum For This Course
18 Lectures
Introducing functional programming
7 Lectures 57:16

This video will be overview of the entire course.

Preview 02:50

In functional programming, we write functions without side effects the way we write in Mathematics. Let’s see how to define the functions that contain the expression, definition, and parameters that can be expressed by a variable in order to solve problems.

Introducing Functional Programming

For the rest of the discussion in this section, we have to create some code in C#. We will use Visual Studio 2015 Community Edition and .NET Framework 4.6.2. But, before getting started, we must know how to define the configuration settings.

Preparing the C# Compiler

We can also distinguish functional programming from imperative programming by the concepts. The core ideas of functional programming are encapsulated in the constructs. Let’s discuss those concepts in this video.

Concepts of functional programming

This video will discuss about functional programming in C#. We will be discussing both the conceptual aspects of functional programming and write code in C#, as well. Let’s explore currying, pipelining, and method chaining in detail.

Feeling Functional in C#

Now that we have learnt the concepts of functional programming, we need to learn to transform imperative code to functional code by leveraging method chaining. This video consists of an example where we have to create an HTML-ordered list containing the list of the planets in our solar system.

Transforming Imperative Code to Functional Code

So far, we have had to deal with functional programming by creating code using functional approach. Now, we can look at the advantages and limitations of the functional approach.

The Advantages and Disadvantages of Functional Programming
Walkthrough Delegates
3 Lectures 23:36

A delegate is a data type in C# that encapsulates a method that has particular parameters and return types. Let’s dig a little deeper into delegate syntax and use to learn how it will define the parameters and the return type of a method.

Preview 11:22

In C#, not only are we able to declare a delegate, but we are also able to use the built-in delegate from the C# standard library. This built-in delegate also applies to the generic data type, so let's discuss the generic delegate prior to discussing the built-in delegate.

Built-in Delegates

A generic delegate has the ability to be assigned by a method that has an unmatched signature to the delegate. We can call this variance in delegates. There are two variances in delegates; covariance and contravariance. This video will help us learn them.

Distinguishing Variance in Delegates
Expressing Anonymous Methods with Lambda Expressions
4 Lectures 26:09

In the previous section, we already discussed how to declare a delegate using named methods. When using named methods, we have to create a method first, give it a name, and then associate it with the delegate. Let’s explore how we do that.

Preview 07:13

We now have an idea that anonymous methods can help us create a simple and short method. However, in C# 3.0, lambda expressions were announced in order to complement anonymous methods in providing a shorthand notation to create anonymous methods. This video will help us know everything related to lambda expressions.

Lambda Expressions

In C#, an object or a class can be used to inform other objects or classes when something happens, which is known as an event. There are two kinds of classes in the event, they are publishers and subscribers. Let’s learn how lambda expressions are used to handle events.

Subscribing for Events Using Lambda Expressions

Lambda expressions are not only a powerful way to provide a shorthand notation for anonymous methods, but they are also used in functional programming. In this video, we will go through the advantages of using the lambda expression in the context of functional programming.

The Advantages of Using Lambda Expression in Functional Programming
Extending Object Functionality with Extension Methods
4 Lectures 21:06

An extension method is a capability that can extend the ability of an existing class or type without making any modification to the existing class or type. Let’s explore how extension method enables us to add methods to the existing class or type without having to either create a new derived type or recompile.

Preview 03:44

We have successfully created the IsPalindrome() extension method in the previous section. It's quite easy to call the extension method since it's defined inside the same namespace as the caller method. But, we must learn how to work with the namespace.

Calling Extension Methods in the Other Assemblies

Not only can classes and types apply an extension method, but interfaces, collections, and any other objects can be functionally extended using an extension method as well. This video shows us how to extend interface, collection and object.

Leveraging the Interface, Collection, and Object

Method chaining in functional programming relies on extension methods. As we have already discussed in Section 1, method chaining makes our code easier to read. At the same time, extension method still has some limitations. Let’s take a look at the advantages and limitations of extension method.

Advantages and Limitations of the Extension Method
About the Instructor
Packt Publishing
3.9 Average rating
7,264 Reviews
51,798 Students
616 Courses
Tech Knowledge in Motion

Packt has been committed to developer learning since 2004. A lot has changed in software since then - but Packt has remained responsive to these changes, continuing to look forward at the trends and tools defining the way we work and live. And how to put them to work.

With an extensive library of content - more than 4000 books and video courses -Packt's mission is to help developers stay relevant in a rapidly changing world. From new web frameworks and programming languages, to cutting edge data analytics, and DevOps, Packt takes software professionals in every field to what's important to them now.

From skills that will help you to develop and future proof your career to immediate solutions to every day tech challenges, Packt is a go-to resource to make you a better, smarter developer.

Packt Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.