摘要: 一、获取当前文件的路径 1. System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName 获取模块的完整路径,包括文件名。2. System.Environment.CurrentDirectory 获取和设置当前目录(该进程 阅读全文
posted @ 2017-02-14 16:02 寒夜美美 阅读(7038) 评论(0) 推荐(0) 编辑
摘要: //获取到bin目录的下层路径:bin\Debug\ string aa = System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase; string cc = System.AppDomain.CurrentDomain.Bas 阅读全文
posted @ 2017-02-14 16:01 寒夜美美 阅读(300) 评论(0) 推荐(0) 编辑
摘要: .Net2.0中新增了很多组件,WebClient就是其中一个,功能也很强大,今天拿WebClient做了一个小实验,只用到了一些很简单的功能就可以实现以前不好实现的功能,很方便。 简单介绍一下WebClient: WebClient 类提供向 URI 标识的任何本地、Intranet 或 Inte 阅读全文
posted @ 2017-02-14 15:58 寒夜美美 阅读(445) 评论(0) 推荐(0) 编辑
摘要: WebClient client = new WebClient(); 第一种 string URLAddress = @"http://files.cnblogs.com/x4646/tree.zip"; string receivePath=@"C:\"; client.DownloadFile 阅读全文
posted @ 2017-02-14 15:56 寒夜美美 阅读(4819) 评论(0) 推荐(0) 编辑