2009-06-04から1日間の記事一覧
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 t…
using System; namespace Test { enum Color { NoColor, Red, Green, Blue } public class Foo { public static void Main() { // 列挙 => 文字列 Color c = Color.Red; Console.WriteLine(c.ToString()); // 名前の文字列に変換 Console.WriteLine(c.ToStri…