[code lang="c#"]
FileInfo myFile = new FileInfo("c:\\myfile.txt");
if ((myFile & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)
{
// remove the read only attribute
myFile.Attributes = (FileAttributes)(Convert.ToInt32(myFile.Attributes) - Convert.ToInt32(FileAttributes.ReadOnly));
}
[/code]
