6 posts about Source Generators by 5 contributors.
Know Source Generators? Share what you know with developers who are learning it.
Dapper.AOT compiles clean on .NET 10 but its interceptors silently never wire, crashing your published AOT binary at the first query. The root cause, why no config fixes it, and the measured verdict on what to use instead.
With this guide, you will learn about enhanced pattern matching, static abstract members, Native AOT, and much more in C# 13 and .NET 9. Written by Ziggy Rafiq, this is the best resource for experienced .NET Software Engineer Leads.
Find out what C# 10 has to offer in Ziggy Rafiq's insightful article, "Code Generation and Productivity in C# 10 with Source Generators." Learn about the power of source generators, which streamline code generation during compilation, reducing redundancy and improving productivity. Discover how source generators offer improved performance, enhanced readability, and practical examples such as auto-implementing interfaces and serialization code generation. C# source generators help you create cleaner, more manageable codebases and will enhance your development workflow and efficiency. Ziggy Rafiq provides an in-depth overview of implementing source generators and demonstrates their versatility in creating cleaner, more manageable codebases.
C# 12's experimental Interceptors let you reroute method calls during compilation. Think of them as "code detours" for specific methods, allowing modifications without directly changing the code. They work with source generators for advanced use cases like performance optimization.
You explained the process step by step, starting with the definition of attributes and the implementation of the generator class, followed by the initialization and execution processes. Additionally, you provided a clear demonstration of how to generate a new class with a static property that returns the current date and time as a string. Your use of the StringBuilder class and string interpolation for code generation was a good choice.
DevSocialUpcoming · 3rd editionAI Agents ConferenceNov 23–27, 2026Live onlineMembers only16days leftRegisterPublish an article in this category and earn +1,000 SHARP when it is approved.
Write an article