7
Observing and Modifying Code Execution Dynamically
This chapter is about some common types that are included with .NET for performing code reflection and applying and reading attributes, working with expression trees, and creating source generators. These technologies enable a broad range of capabilities from code inspection and modification to runtime behavior alteration. This can significantly enhance the flexibility and efficiency of your applications.
Reflection is a powerful feature in .NET that allows programs to inspect and manipulate themselves. It can be used to access information about assemblies, modules, and types, and to dynamically create and invoke types and methods.
Expression trees represent code in a tree-like data structure, ...
Get Tools and Skills for .NET 8 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.