リフレクションによって実行時に型自身の情報を取得することができます。 取得できる情報については後述の§.Typeクラスから取得できる情報§.メンバ情報の取得 (MemberInfo)などで解説します。

リフレクション機能を使って実行時に型情報を取得する
Imports System
Imports System.Reflection

Class Account
  Public Property ID As Integer
  Public Property Name As String

  Public Sub New(ByVal id As Integer, ByVal name As String)
    Me.ID = id
    Me.Name = name
  End Sub
End Class

Class Sample
  Shared Sub Main()
    ' Accountクラスの型情報を取得する
    Dim t As Type = GetType(Account)

    Console.WriteLine("Name = {0}", t.Name)
    Console.WriteLine("BaseType = {0}", t.BaseType)

    ' Accountクラスのすべてのメンバ情報を取得する
    ' (パブリックおよび非パブリックのインスタンスメンバを取得する)
    Dim members() As MemberInfo = t.GetMembers(BindingFlags.Public Or BindingFlags.NonPublic Or BindingFlags.Instance)

    For Each m As MemberInfo In members
      Console.WriteLine("MemberType = {0}, Name = {1}", m.MemberType, m.Name)
    Next
  End Sub
End Class
実行結果例
Name = Account
BaseType = System.Object
MemberType = Method, Name = get_ID
MemberType = Method, Name = set_ID
MemberType = Method, Name = get_Name
MemberType = Method, Name = set_Name
MemberType = Method, Name = Equals
MemberType = Method, Name = Finalize
MemberType = Method, Name = GetHashCode
MemberType = Method, Name = GetType
MemberType = Method, Name = MemberwiseClone
MemberType = Method, Name = ToString
MemberType = Method, Name = obj_address
MemberType = Constructor, Name = .ctor
MemberType = Property, Name = ID
MemberType = Property, Name = Name
MemberType = Field, Name = <ID>k__BackingField
MemberType = Field, Name = <Name>k__BackingField