zoukankan      html  css  js  c++  java
  • StreamReader & StreamWriter

     public void wirte()
        {
            try
            {
                StreamReader sr = new StreamReader("c:\\Variables.txt");
                string content = sr.ReadToEnd();
                sr.Close();

                StreamWriter sw = new StreamWriter("c:\\Variables.txt", false, Encoding.Unicode);
                string NextLine = "This is the appended line.";

                sw.Write(content + ControlChars.NewLine + NextLine);
                sw.Close();
            }
            catch(Exception ex)
            {
                Response.Write(ex.Message);
            }
            finally
            {


            }

        }

  • 相关阅读:
    python
    爬虫
    python 自动登录
    day22 cookie session 中间件 Form
    day10进程、异步IO、
    python第五课
    day21
    day20 Django
    day 19
    day18
  • 原文地址:https://www.cnblogs.com/aspsmile/p/871240.html
Copyright © 2011-2022 走看看