11智能在线
新记
说明c#中特殊运算符as、is、new、sizeof、typeof 的含义。
如题所述
举报该文章
相关建议 2010-12-22
as强制转换, obj as str,把obj转换成string,转换失败返回为null;
is判断是否为制定类型,str is string,判断str是否为string;
new就是创建一个实例 DataTable dt = new DataTable();
sizeof判断某个类型在内存中占用的字节数;
typeof返回变量的类型,int i = 0; typeof(i)。
温馨提示:内容为网友见解,仅供参考
当前网址:
https://11.t2y.org/zz/pq4ssmq2q.html
其他看法
第1个回答 2010-12-19
cgnxc
本回答被网友采纳
相似回答
大家正在搜
相关问题
C#中的杂项运算符,有什么用啊,sizeof,什么情况下能使...
C#中有什么特殊的运算符
C#中如何重载赋值运算符=
c/c++ 中哪些运算符是看起来类似函数的?例如new,si...
C#中运算符&& 和 ||用法
c#编程中各符号的意思。
C#中的“或,与,非”用什么表示?
C#中Typeof是干什么的?