This article showed you how reflection is used to work with type data. We looked at the limitations of traditional C++ runtime type information (RTTI) and saw how much more powerful reflection is for working with type information. We then discussed why and when you would want to use reflection. Finally, we described how reflection works, focusing on the most obvious features of the Type class and several classes in the System::Reflection namespace. To demonstrate these concepts, we provided a code example that analyzes a target assembly and writes a report on the type information discovered within that assembly.
For more discussion on reflection using Visual C++ with managed extensions, and the corresponding sample programs, please download the sample chapter: http://www.objectinnovations.com/dotnet/articles/thorsteinson_1.htm.