代码入下:
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); }}
- 1楼cjr15233661143昨天 21:16
- 加点注释就更好了 初学者的水平真看不懂啊呵呵