string path = "E:\\sasi\\delt.doc"; FileInfo myfileinf = new FileInfo(path); myfileinf.Delete();
Use NameSpace: using System.IO;
File.Delete(Server.MapPath("~/ProductImage/" + ProductImage));
if (System.IO.File.Exists(@"C:\test.txt")) System.IO.File.Delete(@"C:\test.txt"));
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)