using System;
using System.Text;
using System.Windows.Forms;
using System.Reflection;
class MainClass {
static void Main() {
Type t = typeof(double);
Console.WriteLine("Type Name: " + t.Name);
Console.WriteLine("Full Name: " + t.FullName);
Console.WriteLine("Namespace: " + t.Namespace);
Type tBase = t.BaseType;
if (tBase != null)
Console.WriteLine("Base Type:" + tBase.Name);
Type tUnderlyingSystem = t.UnderlyingSystemType;
if (tUnderlyingSystem != null)
Console.WriteLine("UnderlyingSystem Type:" + tUnderlyingSystem.Name);
Console.WriteLine("\nPUBLIC MEMBERS:");
MemberInfo[] Members = t.GetMembers();
foreach (MemberInfo NextMember in Members) {
Console.WriteLine(NextMember.DeclaringType + " " + NextMember.MemberType + " " + NextMember.Name);
}
}
}
|