Extracting Attributes Using Reflection

You can discover and respond to attribute information programmatically using reflection. Chapter 6, “Reflection,” provides an example demonstrating how to use reflection to extract attributes programmatically. Many of the reflection capabilities for managing attributes are also covered in Chapter 6. In this section I have included a brief example that demonstrates how to extract the URN associated with entities that use the HelpAttribute introduced earlier in this chapter.

Suppose you elected to extract Help attributes programmatically to facilitate displaying help information from a central repository. You could write generic code that read HelpAttribute URNs on demand and displayed the content referenced ...

Get Visual Basic® .NET Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.