C# typeof() 和 GetType()区别
来源:互联网 发布:域名备案系统 编辑:程序博客网 时间:2024/05/05 07:49
C# typeof() 和 GetType()区别是什么?1、typeof(x)中的x,必须是具体的类名、类型名称等,不可以是变量名称。 2、GetType()方法继承自Object,所以C#中任何对象都具有GetType()方法,它的作用和typeof()相同,返回Type类型的当前对象的类型。 比如有这样一个变量i: Int32 i = new Int32(); i.GetType()返回值是Int32的类型,但是无法使用typeof(i),因为i是一个变量,如果要使用typeof(),则只能:typeof(Int32),返回的同样是Int32的类型。
- C# typeof 和 GetType区别
- C# typeof 和 GetType区别
- C# typeof() 和 GetType()区别
- C# typeof() 和 GetType()区别
- C# typeof() 和 GetType()区别
- C# typeof 和 GetType区别
- C# typeof() 和 GetType()区别
- C# typeof() 和 GetType()区别
- C# typeof() 和 GetType()区别
- C# typeof() 和 GetType()区别
- C#中的typeof()和GetType()的区别
- C#中的typeof()和GetType()的区别
- C# GetType和typeof()的区别
- C# GetType和typeof的区别
- C# typeof() 和 GetType()的区别
- C# typeof() 和 GetType() 的区别
- GetType和typeof的区别
- C#typeof() 和 GetType()区别
- HTTP 协议 理解
- vijos 1002 Victoria的舞会2 强连通分量
- 从stl的max函数写法学到的
- Win8+Ubuntu12.04双系统安装(EasyBCD硬盘安装)
- libevent解析1--运行架构
- C# typeof() 和 GetType()区别
- poj 3117 World Cup
- opencv排错总结
- 面试笔试之atoi函数
- C语言各种数据类型在系统中占的字节和取值范围
- postgres源码解析篇1
- xp系统下更改PL2303 USB转串口线的COM端口号的方法
- 初识面向对象(成员变量和局部变量)
- Windows动态库管理(一)