O'Reilly logo

Microsoft® Visual Basic® .NET Programmer's Cookbook by Matthew MacDonald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Examine a Type for Members

Problem

You want to retrieve information about the properties, events, methods, and other members exposed by a type.

Solution

Use methods such as Type.GetMethods, Type.GetProperties, Type.GetEvents, and so on.

Discussion

The Type class is a starting point for a detailed examination of any .NET type. You can use the following methods to delve into the structure of a type:

  • GetConstructors. retrieves an array of ConstructorInfo objects, which detail the constructors for a type.

  • GetMethods. retrieves an array of MethodInfo objects, which describe the functions and subroutines provided by a type.

  • GetProperties. retrieves an array of PropertyInfo objects, which describe the properties for a type.

  • GetEvents. retrieves an array of

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required