Expression Trees in C#
Expression trees are an advanced approach to creating code, both at design time and at run time. This course will teach you what they are, what they do, and how to make them work for you.
What you'll learn
Expression trees are an advanced approach to creating code, both at design time and at run time. In this course, Expression Trees in C#, you’ll learn about expressions and functions. First, you’ll explore the func delegate. Next, you’ll discover expressions you can compile to functions. Finally, you’ll learn how to construct extended expressions trees to get your work done. When you’re finished with this course, you’ll have the skills and knowledge of C# Expression trees needed to make your runtime compilation work.
Table of contents
- Introduction 4m
- Delegates, Functions, and Expressions 3m
- Demo: A Quick Delegate Refresher 4m
- The Func and Action Delegates in C# 2m
- Demo: Func and Action Delegates 4m
- Exercise 01 - Pass a Func to a function 0m
- Lambda Functions 1m
- Demo: A Simple Lambda 2m
- Summary 1m
- Checkpoint 01 - Change a Function to a Lambda 0m
- LINQ and Expressions 1m
- Demo: Extracting Our Lambda 3m
- Introducing LINQPad 1m
- Demo: Working with LINQPad 8m
- IEnumerable 1m
- Demo: The Difference between IEnumerable and IQueryable 5m
- Types of Expressions 4m
- Demo: Different Expression Types 3m
- A Tree with More Branches 2m
- Exercise 02 - Implement a Simple Expression 0m
- Demo: Adding a Branch to the Tree 2m
- Summary 1m
- Checkpoint 02 - Declare a Constant Expression 0m
- Introduction 1m
- Demo: Your Base Project 2m
- The Problem of Dynamic Filtering 1m
- Demo: Implementing a Dynamic Expression for Filtering Results 3m
- Closing the Loops 2m
- Demo: Advanced Filtering with Operators 7m
- Demo: Making All This Generic 2m
- Parsing a Lambda 2m
- Demo: Parsing a Lambda 5m
- Checkpoint 03 - Access a Property for Comparison 0m
- Towards a Scripting Engine with Expressions 3m
- Demo: A Simple Script Implementation 6m
- Working with Roslyn 3m
- Demo: Working with Roslyn 11m
- Course Summary 3m