c# 软件自动升级 程序自我关闭自己后重启
摘要://指定一个文件名,写入脚本 string filename = Path.Combine(path,"killmyself.bat"); using (StreamWriter bat = new Stream...
阅读全文
posted @
2014-05-08 17:46
猪小娣
阅读(1150)
推荐(0)
c# 解压文件
摘要:public bool UnRAR(string destPath, string rarfilePath) { try { // destPath = @"E:\youxiaodi\temp"; //目标位...
阅读全文
posted @
2014-05-07 17:03
猪小娣
阅读(975)
推荐(0)
File / Directory 文件的操作及远程下载
摘要://文件远程下载 WebClient client = new WebClient(); Uri uri = new Uri(url); client.DownloadFile(Uri uri,String filename);//文件一定得存在不然会报错所以在删除文件时先判断这个文件是否存...
阅读全文
posted @
2014-05-07 16:59
猪小娣
阅读(373)
推荐(0)
HttpWebRequest / HttpWebResponse 远程获取文件信息
摘要:HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create(path+filename); //创建一个请求(获得需要的文件信息) HttpWebResponse myRes = (HttpWebResponse)myReq.GetRe...
阅读全文
posted @
2014-05-07 11:51
猪小娣
阅读(993)
推荐(0)
XML的操作
摘要:感觉几个世纪没有来博客园记录了荒废了好久的时间,还是得把写过的东西记录下来才行,今天记录下对XML的操作。修改XML XmlDocument local = new XmlDocument(); local.Load(path+"File.xml");//获得XML中某一项的值 XmlNo...
阅读全文
posted @
2014-05-05 11:00
猪小娣
阅读(617)
推荐(0)