码迷,mamicode.com
首页 > Windows程序 > 详细

C#删除文件

时间:2016-12-20 19:55:56      阅读:221      评论:0      收藏:0      [点我收藏+]

标签:color   current   ring   存在   sts   html   删除文件   url   删除   

string file =System.Web.HttpContext.Current.Server.MapPath(fileUrl);
                if (System.IO.File.Exists(file))//判断文件是否存在
          { System.IO.File.Delete(file); }

查找自:https://zhidao.baidu.com/question/123004173.html

C#删除文件

标签:color   current   ring   存在   sts   html   删除文件   url   删除   

原文地址:http://www.cnblogs.com/dzw159/p/6203596.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!