加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

C#中使用的?字符是什么

发布时间:2020-12-15 20:01:30 所属栏目:百科 来源:网络整理
导读:我今天遇到了这段代码: File.SetAttributes(excelFileName,File.GetAttributes(excelFileName) ~ (FileAttributes.Archive | FileAttributes.ReadOnly)); 从未见过它.谁知道? 解决方法 http://msdn.microsoft.com/en-us/library/d2bd4x66.aspx ?运算符对其
我今天遇到了这段代码:

File.SetAttributes(excelFileName,File.GetAttributes(excelFileName) & ~
                   (FileAttributes.Archive | FileAttributes.ReadOnly));

从未见过它.谁知道?

解决方法

http://msdn.microsoft.com/en-us/library/d2bd4x66.aspx

?运算符对其操作数执行按位补码运算,具有反转每个位的效果.为int,uint,long和ulong预定义了按位补码运算符.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读