Quick Answer
Reflection: runtime type inspection and invocation รขโฌโ slow, bypasses compile-time safety. Reflection.Emit: generates IL at runtime รขโฌโ used in proxies and ORMs. Expression Trees: represent code as data structures, compiled to delegates รขโฌโ used in LINQ providers. Source Generators: generate code at compile time รขโฌโ zero runtime cost, the modern preferred approach.
Answer
Reflection: runtime inspection, slow
Emit: dynamic IL generation
Expression Trees: compile to delegates for fast execution
Source Generators: compile-time code generation using Roslyn
S
SugharaIQ Editorial Team
Verified Answer
This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.
Complete .NET Core interview questions and answers covering beginner, junior, mid-level, senior, and expert concepts for freshers and experienced developers.