using System;
using System.IO;
using System.Reflection;

class Mymemberinfo
{ 
	public static void Main(string[] args)
	{ 
		Console.WriteLine ("\nReflection.MemberInfo");
		// 取得 Type 和 MemberInfo.
		Type MyType =Type.GetType("System.IO.File");
		MemberInfo[] Mymemberinfoarray = MyType.GetMembers(); 
		// 取得并显示 DeclaringType 方法 
		Console.WriteLine("\n有 {0} 个成员在 {1} 中.", 
			Mymemberinfoarray.Length, MyType.FullName);
		Console.WriteLine("{0}.", MyType.FullName); 
		if (MyType.IsPublic)
		{
			Console.WriteLine("{0} 是共有的(public).", MyType.FullName);
		}
	}
}
