Reflection isn't Always Evil
With the current advanced state of the .Net framework, newer .Net developers may have not worked with reflection code, and some more experienced .Net developers insist that it is pure evil, using code and performance metrics that may no longer be the best methods or relevant. Applications and frameworks that we use everyday however are taking full advantage of the functionality that reflection provides.
We will be breaking up what we commonly refer to as reflection into the categories of introspection, manipulation, instantiation, invocation, and type loading. We will review the common classes and methods used within each category along with sample code. We will then take a deeper look at the multiple techniques for method invocation that more recent .Net framework versions provide, along with their corresponding performance, and best scenarios for each.
Whether you choose to use this knowledge for good or evil will be up to you.
Bruce Dunwiddie (@shriop (http://twitter.com/shriop))
Bruce is a lifelong developer with 15 years of professional experience focusing on data, performance, and stability. He is currently contracting for companies with high volume data challenges as a local expert in SQL Server database design, query and index optimization. Bruce also sells data oriented products online; DataStreams ETL library for .Net at http://csvreader.com and SQL Data Dictionary at http://sqldatadictionary.com .
Premier Tech, Inc. (http://www.ptech-info.com)