摘要:
显示指定目录下的所有文件: string[] files = Directory.GetFiles("C:\\Myfiles"); this.txtContent.Clear(); foreach(string item in files) { this.txtContent.Text += ite 阅读全文
posted @ 2020-08-11 02:46
pandora2050
阅读(126)
评论(0)
推荐(0)
摘要:
引入命名空间 using System.IO; 写入: //1.创建文件流 FileStream fs = new FileStream("D:\\xxx.txt", FileMode.Create); //2.创建写入器 StreamWriter sw = new StreamWriter(fs, 阅读全文
posted @ 2020-08-11 02:34
pandora2050
阅读(159)
评论(0)
推荐(0)