Introducing ReflectionIT.PropertyThrowGenerator - Add compile‑time validated properties to your C# classes with zero boilerplate
01-Jun-2026
.NET 6, 7 and 8 introduced a set of powerful Argument...Exception.ThrowIf... helper methods. They’re fast, they’re clean, and they eliminate a ton of repetitive guard‑clause code. But let’s be honest: writing validation logic in every property setter still gets old quickly.
So I built ReflectionIT.PropertyThrowGenerator — a Roslyn source generator that injects validation logic directly into your partial properties using simple [ThrowIf...] attributes. You declare what should be validated, and the generator writes the how.
No more boilerplate. No more forgetting a null check. No more copy‑paste errors.
Just clean, validated properties.