50 likes | 249 Views
Notes on Reflection. Robert T. Tattersall New England Visual Basic Professional User Group July 1st, 2004. About Reflection. “Reflection provides objects that encapsulate assemblies, modules, and types.” MSDN “You can use reflection to dynamically create an instance of a type...” MSDN
E N D
Notes on Reflection Robert T. Tattersall New England Visual Basic Professional User Group July 1st, 2004
About Reflection • “Reflection provides objects that encapsulate assemblies, modules, and types.” MSDN • “You can use reflection to dynamically create an instance of a type...” MSDN • “You can then invoke the type's methods or access its fields and properties.” MSDN • “Reflection.Emit namespace contains classes that allow a compiler or tool to emit metadata and Microsoft intermediate language (MSIL)” MSDN
About Reflection (cont.) • System.Reflection namespace contains most Reflection classes. • System.Type is Reflection class used to access type metadata.
About Reflection (cont.) • Reflection is used by .Net (e.g. XML serialization) • Reflection used by tools like ILDasm (.Net Framework Intermediate Language Disassembler) • Use of Reflection governed by security policy.
Learn more about Reflection Introducing Microsoft .Net 3rd Edition Microsoft Press Dave S. Platt Programming Microsoft Visual Basic .Net Microsoft Press Francesco Balena Applied Microsoft .Net Framework Programming Microsoft Press Jeffrey Richter