Advanced C#: Hands-on with LINQ, Dynamic Type, Extension Methods, and Tuples
47mBeginner2023-09-13
Authors

Matt Milner
Independent Consultant, Web Developer, Trainer
Course details
If you’re new to the field or an old pro, staying on top of programming language features and leveraging them to code efficiently is an important part of being a developer. It's important to challenge yourself to keep learning, and in this advanced course, Matt Milner helps you expand your knowledge of a C# with a series of lessons and challenges aimed at sharpening your skills. Matt starts off by showing how to join a collection of objects to a database table in LINQ. He then explains dynamic type and its purpose in C#, shows how to create extension methods, demonstrates working with tuples, and ends with a chapter on creating generic types and methods.
Skills covered
C#Programming LanguagesMicrosoftSoftware DevelopmentOne-Off
Concepts
Introduction
- Advance your skills
- What you should know
- CoderPad tour
Joining with LINQ
- Joining datasets in a LINQ query
- Understanding issues of joining collections with databases
- Solution - LINQ cross-source join
Using the Dynamic Type
- The dynamic type
- Using the dynamic type
- Solution - Using a dynamic type in a method
Creating Extension Methods
- Extension methods
- Creating a string extension
- Solution - TrimAndPad extension method
Working with Tuples
- Tuples explained
- Deconstructing a record to a tuple
- Solution - Use a tuple to return data
Creating Generic Types and Methods
- Generic types and methods
- Generic collections
- Solution - Generic class using collections
Conclusion
- Conclusion