How can I programatically remove the readonly attribute from a directory in C#?
If you're attempting to remove the attribute of a file in the file system, create an instance of the System.IO.FileInfo class and set the property IsReadOnly to false.
FileInfo file = new FileInfo("c:\\microsoft.text"); file.IsReadOnly = false;