小弟初学C#,在看Visual C#2005入门经典这本书,在看到示例中判断文件属性的以下语句时,有点迷糊:stbProperties.Append("ReadOnly: ");
stbProperties.Append(Convert.ToBoolean((fileAttributes & System.IO.FileAttributes.ReadOnly)
== System.IO.FileAttributes.ReadOnly));
stbProperties.Append("\r\n");请各位老大详细解释第2句Convert.ToBoolean((fileAttributes & System.IO.FileAttributes.ReadOnly)
== System.IO.FileAttributes.ReadOnly)不胜感激,谢谢!
stbProperties.Append(Convert.ToBoolean((fileAttributes & System.IO.FileAttributes.ReadOnly)
== System.IO.FileAttributes.ReadOnly));
stbProperties.Append("\r\n");请各位老大详细解释第2句Convert.ToBoolean((fileAttributes & System.IO.FileAttributes.ReadOnly)
== System.IO.FileAttributes.ReadOnly)不胜感激,谢谢!
解决方案 »
- 高分求教,关于linq和xml的问题。!!!!!!!!!!!!!!!!!!
- 求教非接触式IC读取问题
- 。。。救命。。。vs2005winform项目显示不了视图啦
- 条码打印问题。。。急!!
- 打算考软设,提几个问题。谢谢。
- C#的程序sql2005中如何批量生成所有已经存在sp的创建语句?
- 大家帮帮忙,谢谢
- XmlDocument问题请教
- 使用WebRequest如何得到带有<META HTTP-EQUIV="refresh" content="10; url=xxxxxxx.asp">的网页执行后的内容?
- 问题标签用户 C#的datagridview控件数据源链接mysql失败的问题,谢谢。
- C#winform中如何点击一个窗体的button,向另一个窗体动态添加button控件
- 问个正则与字符串的问题
(fileAttributes & System.IO.FileAttributes.ReadOnly) == System.IO.FileAttributes.ReadOnly
这个表达式本来就是返回一个bool值