A new C# compiler feature that inspects code and generates additional source files promises to improve performance in a number of scenarios.

Microsoft has introduced a preview of a C# compiler capability called Source Generators that can inspect a program and generate source files that can be added to a compilation. Microsoft says Source Generators can improve performance in a number of scenarios.

Introduced April 29, a Source Generator is a piece of code (a .NET Standard 2.0 assembly) that runs during compilation and can inspect a program to produce additional files that are compiled together with the rest of the code.

#c #c# #c++ #programming-c

C# Source Generators to boost performance in .NET 5
1.75 GEEK