Type型の値の取得方法
using System; namespace Test { enum E {} class Foo {} public class Bar { public static void Main() { Type t = Type.GetType("Test.Foo"); Type t2 = typeof(Foo); Type t3 = Type.GetType("Test.E"); Type t4 = typeof(E); Foo b = new Foo(); Type t5 = b.GetType(); foreach (Type type in new Type[] {t, t2, t3, t4, t5}) { Console.WriteLine(type); } // [実行結果] // Test.Foo // Test.Foo // Test.E // Test.E // Test.Foo } } }