modernsky2003

2007年12月20日 #

C#中常用的WEB方式的文件操作方法

摘要: C#追加文件 StreamWriter sw = File.AppendText(Server.MapPath(".")+"\\myText.txt"); sw.WriteLine("追逐理想"); sw.WriteLine("kzlll"); sw.WriteLine(".NET笔记"); sw.Flush(); sw.Close(); C#拷贝文件 string OrignFil... 阅读全文

posted @ 2007-12-20 17:22 hekeneng 阅读(281) 评论(0) 推荐(0) 编辑

C#中遍历文件夹目录的问题

摘要: 递归实现查找目录下的所有子目录和文件 public void FindFile(string dir) //参数为指定的目录 { //在指定目录及子目录下查找文件,在listBox1中列出子目录及文件 DirectoryInfo Dir=new DirectoryInfo(dir); try { for... 阅读全文

posted @ 2007-12-20 16:41 hekeneng 阅读(226) 评论(0) 推荐(0) 编辑

C# 操作文件夹及文件

摘要: class Program { /**//// /// 追加文件,文件不存在则创建,存在则向文件写数据 /// /// /// public static void WriteFile(string users,string content) { ... 阅读全文

posted @ 2007-12-20 15:49 hekeneng 阅读(419) 评论(0) 推荐(0) 编辑

导航