GetType和typeof的区别 以及一个小实例
摘要:
GetType和typeof的区别typeof: The typeof operator is used to obtain the System.Type object for atype.运算符,获得某一类型的System.Type对象。Type t = typeof(int);GetType: Gets the Type of the current instance.方法,获取当前实例的类型。 int i = 10;Console.WriteLine(i.GetType());区别:Typeof()是运算符而GetType是方法GetType()是基类System.Object的方法, 阅读全文
posted @ 2011-11-26 23:57 _eagle 阅读(11133) 评论(3) 推荐(8) 编辑