⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c#改变文件属性.txt

📁 硬盘杀手病毒技术详细特征 [shief.rar] - 这是一个可以在后台偷取你闪盘里所有资料的小软件。 只要你的闪盘(如U盘,mp3)一插上
💻 TXT
字号:
string path   =   @"c:\temp\MyTest.txt";   
 //   Delete   the   file   if   it   exists.   
 if(!File.Exists(path))     
 {   
    File.Create(path);   
 }   
 if((File.GetAttributes(path)&FileAttributes.Hidden)==FileAttributes.Hidden)     
 {   
    //Show the file.   
    File.SetAttributes(path,FileAttributes.Archive);   
    Console.WriteLine("The   {0}   file   is   no   longer   hidden.",   path);   
 }     
 else     
 {   
     //Hide   the   file. 
     File.SetAttributes(path,   File.GetAttributes(path)|FileAttributes.Hidden);   
     Console.WriteLine("The   {0}   file   is   now   hidden.",   path);   
}   

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -