Jiří Činčura
C# 9 Source Generators - let the machine do the programming
#1about 2 minutes
What are C# source generators and how they work
Source generators are a metaprogramming feature that adds new source code to your project during the compilation phase.
#2about 6 minutes
Exploring common use cases for source generators
Source generators are ideal for replacing reflection, creating high-performance parsers, generating strongly-typed APIs, and producing AOT-friendly code.
#3about 3 minutes
Understanding the limitations and capabilities of generators
Source generators can only add new code, not modify existing code, and they run in a non-deterministic order but can produce compiler diagnostics.
#4about 6 minutes
Demo: Building a simple hello world generator
A step-by-step walkthrough shows how to create a basic source generator that adds a static class and method to the compilation.
#5about 7 minutes
Demo: Generating a C# class from a CSV file
This demonstration shows how to read an external file during compilation and dynamically generate a C# class based on its contents.
#6about 10 minutes
Demo: Automating the INotifyPropertyChanged pattern
Learn how to use attributes and a syntax receiver to automatically generate the boilerplate code for the INotifyPropertyChanged interface.
#7about 6 minutes
Demo: Creating a high-performance custom serializer
This example demonstrates building a source generator that creates a fast, custom serialization method for a class marked with an attribute.
#8about 4 minutes
Managing dependencies and producing compiler diagnostics
Understand the two types of dependencies for source generators and learn how to report custom warnings or errors back to the developer.
#9about 2 minutes
Summary and key takeaways for source generators
Source generators are a powerful tool for library authors to reduce boilerplate, improve performance, and create better developer experiences.
Related jobs
Jobs that call for the skills explored in this talk.
tree-IT GmbH
Bad Neustadt an der Saale, Germany
€54-80K
Intermediate
Senior
Java
TypeScript
+1
ROSEN Technology and Research Center GmbH
Osnabrück, Germany
Senior
TypeScript
React
+3
Matching moments
03:34 MIN
How generative AI is changing software development
The transformative impact of GenAI for software development and its implications for cybersecurity
01:29 MIN
Introduction to generative AI in the browser
Generate AI in the Browser with Chrome AI - Raymond Camden
05:42 MIN
How Konveyor AI uses RAG and agents for code generation
Navigating Application Modernization - Leveraging Gen-AI
06:51 MIN
A live demonstration of GitHub Copilot in VS Code
How we will build the software of tomorrow
03:09 MIN
The evolution of how developers source their code
Can Machines Dream of Secure Code? Emerging AI Security Risks in LLM-driven Developer Tools
04:20 MIN
Understanding the Roslyn compiler platform for C#
Building a Compiler with C#
01:13 MIN
The inefficiency of natural language for code generation
How to become an AI toolsmith
02:55 MIN
Introducing Spring AI for generative AI applications
Building AI-Driven Spring Applications With Spring AI
Featured Partners
Related Videos
Building a Compiler with C#
Florian Rappl
C# 13 Unleashed: Live Demos of my Top 10 Cutting-Edge Features!
Ambesh Singh & Sachin Kumar
Hacking C# from the inside - how to do anything in NET
Adam Furmanek
5 features that help you get the most out of C# 10
Louëlla Creemers
Exploring the Latest Features of .NET and C# by Building a Game
Rainer Stropek
Livecoding with AI
Rainer Stropek
Using code generation for test automation – the fancy way
Roman Alexis Anastasini
Turbocharged: Writing High-Performance C# and .NET Code
Steve Gordon
Related Articles
View all articles



From learning to earning
Jobs that call for the skills explored in this talk.


Materna GmbH
Berlin, Germany
Remote
Junior
Scrum
Python
Angular
TypeScript


IT Partner España
Municipality of Madrid, Spain
€46K
Intermediate
GIT
Python
Continuous Integration


GFR Technologies SE
Municipality of Madrid, Spain
Remote
Intermediate
API
GIT
Azure
Scrum
+9


Advanced Group
München, Germany
Remote
API
C++
Python
OpenGL
+6

AOK Systems GmbH
München, Germany
GIT
Azure
Linux
Python
Docker
+5