标签:style sp for strong on bs ef tt line
typeof: The typeof operator is used to obtain the System.Type object for a type.
运算符,获得某一类型的 System.Type 对象。
Type t = typeof(int);
GetType: Gets the Type of the current instance.
方法,获取当前实例的类型。
int i = 10;
Console.WriteLine(i.GetType());
区别: Typeof()是运算符而GetType是方法
标签:style sp for strong on bs ef tt line
原文地址:http://www.cnblogs.com/chengjun/p/4169907.html