随笔分类 -  C#

摘要:string path = AppDomain.CurrentDomain.BaseDirectory+"UserContent1.xml"; //判断相应路径下文件是否存在 不存在的情况下就新建 if (!File.Exists(path)) { File.Create(path); ... 阅读全文
posted @ 2018-06-09 15:59 MrXiang 阅读(156) 评论(0) 推荐(0)
摘要:1 //文件的读取方式一 2 //直接读取文件 3 4 string textContent=File.ReadAllText("路径","读取的文件内容类型"); 5 6 //文件读取 方式二 7 8 string FileName="";//表示路径 9 using(FlieStream fs= 阅读全文
posted @ 2018-05-30 18:46 MrXiang 阅读(304) 评论(0) 推荐(1)
只有注册用户登录后才能阅读该文。
posted @ 2018-05-16 14:56 MrXiang 阅读(2) 评论(0) 推荐(0)