C# Extension Methods
One of the most powerful and underused features of C#: extension methods. Master them to cut duplicate code and add consistency across your projects. This course teaches all you need to improve your .NET Core and .NET Framework apps with extensions.
What you'll learn
Extension methods are a key feature of C# - they boost productivity, increase the readability of your code, and make it easy to implement standards across your projects. In this course, C# Extension Methods, you will learn all you need to know about extension methods in .NET Framework and .NET Core. First, you will learn the basics of extension methods: how to use them, how to write them, and how the tooling in Visual Studio and VS Code helps you to work with them. Then, you will discover the danger areas and the best practices for building your own extension methods. Finally, you will explore how to package and publish your own extension method library. By the end of this course, you will have a complete understanding of how to get value from this powerful feature.
Table of contents
- Why You Need to Master Extension Methods 4m
- Demo: Using Extension Methods 4m
- Understanding Extension Methods 3m
- Demo: Writing Extension Methods 5m
- Demo: Extending .NET's Configuration Library 4m
- Knowing What You Can and Can't Do with Extension Methods 3m
- Demo: The Limitations of Extension Methods 5m
- Module Summary 2m
- Extension Method Best Practice Guidelines 5m
- Demo: Simple Extension Methods, Good and Bad 4m
- Guidelines for Private Extension Method Libraries 3m
- Demo: Extension Method Assemblies Split by Scope 6m
- Guidelines for Public Extension Methods 3m
- Demo: Exploring Extension Methods in Entity Framework and Serilog 6m
- Module Summary 2m