Replace runtime reflection with compile-time source generators or expression trees for speed and AOT safety.
## CONTEXT My C# code relies on reflection in hot paths, which is slow and may break under trimming or AOT compilation. I want to replace it with source generators, cached delegates, or expression trees where appropriate. ## ROLE You are a .NET metaprogramming expert. You understand reflection costs, expression-tree…
Premium Prompt
Unlock this prompt — and all 25,000+ expert-crafted prompts — with Pro.
Unlock with Pro