Expression Trees as a Reflection Alternative in C#: When to Switch
Expression trees as a reflection alternative in C# -- learn to build compiled property accessors, method invokers, and factories in .NET 10.
In-depth C# and .NET tutorials covering structured logging with Serilog, building Roslyn analyzers, NuGet packaging, and other core language and tooling topics.
Showing 85–90 of 264 articles
Expression trees as a reflection alternative in C# -- learn to build compiled property accessors, method invokers, and factories in .NET 10.
Master caching reflection metadata with FrozenDictionary in .NET 10 -- eliminate PropertyInfo overhead, build thread-safe metadata caches, and maximize read performance.
Learn to create, apply, and read custom attributes in C# using reflection -- with practical examples for validation, routing, and plugin registration in .NET 10.
Activator.CreateInstance vs compiled expressions in C# .NET 10 -- understand when each wins and how to build a high-performance factory with cached delegates.
Understand C# reflection performance in .NET 10 -- learn caching strategies, compiled delegates, FrozenDictionary, and when reflection is fast enough.
Learn to use PropertyInfo and MethodInfo in C# to read and write properties, invoke methods, and inspect types at runtime with practical .NET 10 examples.