Chapter 11. Reflection Fundamentals

In This Chapter

  • Introduction to Reflection

  • Working with Method Information

  • Working with Member Information

  • Examining Events

  • Creating and Examining Custom Code Attributes

Reflection is a runtime facility that allows you to write code that can interrogate data types at runtime. This means that you can obtain information about the data type of variables. More than that, it means that you can obtain information about class members, properties, methods, fields, constructors, and much more.

This chapter introduces you to the basics of reflection: what it is and how it works. Then, you will see how to use reflection to work with methods, members (fields, properties, and so on), events and more. Finally, you will see how reflection works to allow you to create and consume custom attributes that can be used to decorate your class with metadata that can be read at runtime.

Microsoft Visual C# 2005 Unleashed
Microsoft Visual C# 2005 Unleashed
ISBN: 0672327767
EAN: 2147483647
Year: 2004
Pages: 298 © 2008-2017.
If you may any questions please contact us: