How Delete File with Readonly Permission?
class Program { static void Main(string[] args) { string file=@"E:\readme.txt"; try { File.SetAttributes(file, FileAttributes.Normal); File.Delete(file); } catch (Exception exp) { Console.WriteLine(exp.Message); } Console.ReadLine(); } }