代碼入下: [csharp] using System; class obj_Sample_Class { public int i = 10; } class MainClass { static void Main() { object a; a = 100; Console.WriteLine(a); Console.WriteLine(a.GetType()); Console.WriteLine(a.ToString()); a = new obj_Sample_Class(); obj_Sample_Class classRef; classRef = (obj_Sample_Class)a; Console.WriteLine(classRef.i); } }