How to Create text file and make it's Properties Hidden and Archive and ReadOnly using C#?
+3
A:
FileStream fs = File.Create("test.txt");
fs.Close();
File.SetAttributes(
"test.txt",
FileAttributes.Archive |
FileAttributes.Hidden |
FileAttributes.ReadOnly
);
Peter Kelly
2010-08-22 14:49:04