C# ~ delete file

protected void deleteFile(string fileName) {
string path = Server.MapPath("~/bulletin/");
try {
System.IO.File.Delete(path + fileName);
} catch (System.IO.IOException e) {
return;
}
}

reference
http://msdn.microsoft.com/zh-tw/library/cc148994.aspx

沒有留言: