C# Expert

Advanced C# and .NET in three days, from source generators to records and pattern matching.

Back to Workshops

In this workshop you go past the syntax and learn how the advanced parts of C# and .NET work. It is up to date with C# 14 and .NET 10. Most of it also applies if you work with older versions.

The workshop mixes presentations, live coding and hands-on exercises. Along with the language features, I show ways to keep your code clean, maintainable and reliable, and the best practices and tools I use myself.

What You Will Learn

  • Advanced C# 14 and .NET 10 features, through live coding, demonstrations and exercises.
  • Modern patterns such as records, value objects and pattern matching, for cleaner and more maintainable code.
  • How source generators, reflection and the .NET ecosystem work underneath.
  • Practical techniques you can use with the latest C# version and with older ones.

Who Is This Workshop For?

C# developers who want to master the advanced features of the language.

Prerequisites

At least a year of work as a C# developer, and the skills covered in my C# Fundamentals workshop. You should be comfortable with Visual Studio, lambda expressions and LINQ.

Workshop Agenda

During the workshop, we cover the following topics.

  • The .NET Ecosystem
    • .NET Framework vs. .NET Core vs. .NET
    • Top-level statements
    • .NET Standard
  • Source Generators
    • Roslyn
    • Analyzers
    • Code-fixes
    • Source generators
  • Visual Studio
    • Dev tunnels
    • Hot reload
    • HTTP files
  • Editor Config
    • Controlling warnings and errors
  • From Delegates to Lambda
    • Delegates
    • Anonymous methods
    • Lambda expressions
    • Func<T> and Action<T>
  • Advanced Lambda Expressions
    • Refactoring using lambda expressions
    • Closures
    • Common problems with closures
  • Optimizing Lambda Expressions
    • Recent lambda expressions improvements
    • Local Functions
  • Value Tuples
    • Classic generic tuples
    • Anonymous types
    • Value Tuples
    • Deconstruct
  • Pattern Matching
    • Switch statement
    • Null checks
  • Switch Expressions
    • Discard
    • Patterns
  • Non-Nullable Reference Types
    • Nullable value types
    • Non-nullable reference types
    • The null-forgiving operator
    • Null-coalescing assignment operator
    • Nullable attributes
  • Value Objects
    • Primitive obsession
    • Implementing value objects
    • Equality
    • Comparing and sorting
    • Overriding ToString()
    • Always valid and Immutability
    • Immutable operations
  • Records
    • Positional records
    • Records vs manually created value objects
    • Nondestructive mutation
    • Extending records
    • Struct and class records
  • Async
    • Tasks
    • Waiting for tasks
    • Cancellation tokens
    • Async/await
  • Dynamic
    • Dynamic types
    • ExpandoObjects
    • Dynamic binding
  • Reflection
    • Working with types
    • Querying and inspecting our applications
    • Creating instances of types
    • Pros and cons of using reflection
  • What’s New in C# 12, 13, and 14
    • Primary constructors
    • Collection expressions
    • TimeProvider

The Async module gives you an introduction to async programming in C#. For the deep dive, see my two-day workshop Asynchronous Programming in C#.

About the Trainer

My name is Tore Nestenius. I teach on-site and remotely, both directly for companies and through training companies in Europe. What I bring:

  • I have trained developers since 2010 and taught several hundred courses and talks.
  • I create, maintain and teach every course myself, and improve it after every delivery.
  • I am a Microsoft .NET MVP.
  • I co-founded Edument, a Swedish training and consulting company, where I was CTO, developer and trainer.
  • I work as an independent senior .NET consultant, so I teach from real projects.
  • I have worked with .NET and C# since 2002.
  • I hold the Azure AZ-204 and AZ-900 certifications.
  • I co-founded the .NET Skåne user group.

Tore Nestenius teaching a course

C# Expert

Duration
3 days or 6 half days

Level
Master

Language
English, Swedish

Training FAQs

Do you provide both on-site and remote training classes?

Yes, I provide both types of training.

Do you provide training in both Swedish and English?

Yes, both options are available. All my course materials are in English and I can teach the class in either Swedish or English.

Do you do half-day training?

When I run on-site, I usually do full-day classes. For remote training, I can provide options for both half and full days.

Do you do webinars and shorter talks?

Yes, please visit my Talks page for more details.

Do you provide customized courses?

Yes, I do. Contact me for more information.

Get in touch

Contact