文件创建及读取的方法

来源:互联网 发布:实对称矩阵的特征向量 编辑:程序博客网 时间:2024/06/07 19:03

以前创建用

      String filePath = HttpContext.Current.Server.MapPath(FileName);

        
if (!System.IO.File.Exists(filePath))// 创建文件
            System.IO.File.Create(filePath);

        System.IO.StreamWriter sw 
= new System.IO.StreamWriter(filePath, false);
        sw.WriteLine(html);
        sw.Close();


文章来源于 http://www.cnblogs.com/wf225 版权归原作者所有
原创粉丝点击