July 2003
Intermediate to advanced
736 pages
16h 35m
English
In Chapter 5 you will learn about attributes: how to use some of the interesting existing attributes and how to create customer attributes. We'll leap ahead a bit for a moment and take a look at the mechanics of requesting attributes by using Reflection. At the heart of our technical demonstration is the Attribute class and the GetCustomAttributes method. Listing 4.15 demonstrates how to request attributes for a specific type. (In Chapter 5 you will learn that any element might have attributes applied; the same code demonstrated in Chapter 5 will return Reflected attributes for members as well as types.)
Dim Attributes() As Object Attributes = GetType(Customer).GetCustomAttributes(True) ... |
Read now
Unlock full access