Reflecting a Single Type
Reflecting all types within an assembly can be useful, but probably in most cases you will be interested in reflecting a single type. To accomplish this you need the instance of a System.Type;
then invoke members described in the previous section. For example, imagine you want to inspect members from the Person
class. You first get the type instance, and then you can perform reflection as demonstrated by the following code:
The preceding code produces the following result:
For more details, the MSDN documentation on the ...
Get Visual Basic® 2010 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.