reflection_memberinfo1
 
Code :

using System;
using System.ComponentModel;
//csc reflection_memberinfo1.cs
using System.Reflection;

namespace ConsoleApplication1
{
class A {
Type t = Assembly.GetExecutingAssembly().GetType("System.String");
public void method()
{
Console.WriteLine("this "+ t.ToString());
}

}
class B :A { }
class MainClass
{

public static void Main(string[] args)
{
Type MyType = Type.GetType("System.IO.File");
MemberInfo[] MI = MyType.GetMembers();
// Get and display the DeclaringType method.
Console.WriteLine("\nThere are {0} members in {1}.",
MI.Length, MyType.FullName);
Console.WriteLine("{0}.", MyType.FullName);
if (MyType.IsPublic)
{
Console.WriteLine("{0} is public.", MyType.FullName);
}

Console.ReadLine();

}
}
}