O'Reilly logo

Microsoft® .NET Compact Framework Kick Start by Ronnie Yates, Erik Rubin

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

Discovering Type Information

The System.Type class is the primary means by which type metadata is accessed. It provides an API that will allow you to manipulate newly discovered types. A System.Type object instance can represent all .NET languages types, including classes, interfaces, arrays, values, and enumerations.

First, you will need to get a reference to a System.Type object instance. There are several different ways to do this. In this section we will discuss two of the most popular.

Retrieving Type Information with the GetType Method

The easiest way to get a reference to a System.Type object instance is to call the GetType method on an already existing object instance. The GetType method is a public virtual method declared on the Object ...

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