Twin Cities Code Camp

Jason Bock

Reflection in .NET: Hacking and Futzing With IL

by Jason Bock

Sun, Apr 01, 2007
Room:
Time: 0:00

Reflection is a powerful way to dynamically inspect assembies at run-time to determine the structure of its contents, invoke methods, and change private field values (among other interesting tricks). But it doesn't stop there - .NET gives you the power to create code at run-time via its reflection infrastructure as well. In this presentation, I'll cover the essentials of the System.Reflection namespace (along with the changes that were added in 2.0), how to emit code at run-time, and other libraries that go far beyond what .NET can currently provide (FxCop's CCI library for introspection and Mono.Cecil for full assembly reading/writing).


About the Author

Jason Bock is a Senior Consultant for Magenic Technologies. He has worked on a number of business applications using a diverse set of substrates and languages such as C#, .NET, and Java. He is the author of "Applied .NET Attributes", "CIL Programming: Under the Hood of .NET", ".NET Security", and "Visual Basic 6 Win32 API Tutorial". He has written numerous articles on software development issues and has presented at a number of conferences and user groups. Jason holds a Master's degree in Electrical Engineering from Marquette University.