Microsoft Visual C# 2005 Unleashed

This chapter has shown you the power of reflection. As you read through this chapter, you learned that in the .NET Framework, data types are also objects that can be treated just like any other object. Data types have methods and properties that can be accessed the same way you access normal object methods and properties. These members allow you to utilize reflection to find out information about methods, members, events, data types, and much more.

Using reflection isn't just a way to find out information about your own code. Having the ability to inspect data types at runtime is an extremely valuable tool. When you find a need for reflection in your own application, you will wonder how you ever managed to write code without it.

Категории