News for hackers. Stuff that matters.
Re:.NET 7 Preview 2 by X-Cubed on Wednesday March 16, 2022 @05:57PM (#30704652)
.Net source generators can't modify existing code, they can only add additional code files, so your first example wouldn't be able to be rewritten by the source generator.

You can read the development discussion and syntax reasoning in the GitHub issue: https://github.com/dotnet/runtime/issues/44676

There are no comments on this comment yet.