摘要:
第一种: 第二种: 它们都一次将文本内容全部读完,并返回一个包含全部文本内容的字符串string str = File.ReadAllText(@"c:\temp\ascii.txt");// 也可以指定编码方式 string str2 = File.ReadAllText(@"c:\temp\as 阅读全文
摘要:
第一种: 第二种: 阅读全文
摘要:
/// /// 下载网络资源 /// /// 地址 /// 保存下载文件的路径,例:"e:\\1.png" private void DownLoadFiled(string url, string path) { WebClient webClient = new WebClient(); webClient.DownloadFile(url, path); } 阅读全文
摘要:
为保持平台的通用性,最好用 Environment.NewLine 阅读全文