New .NET 7 Feature - Regex Source Generator #shorts
Transcript
.NET 7 tips and tricks. As part of the updates in .NET 7, we can now utilize C# source generators to generate our compiled regular expressions at compile time rather than on first use. Inside of a partial class, add the RegexGenerator attribute to a partial method returning the type Regex. For this to take effect, invoke the method as if it was a function that returned your compiled regex, and profit. You can view the full .NET 7 features video from the link in the description.
If you enjoyed this video, consider subscribing to the YouTube channel for more content like this.