zoukankan      html  css  js  c++  java
  • Read from file

    using System.IO;

                FileStream fs = new FileStream(Application.StartupPath + "\\AlarmSet.txt", FileMode.Open, FileAccess.ReadWrite);
                StreamReader sr = new StreamReader(fs, Encoding.GetEncoding("utf-8"));  // 加上Encoding.GetEncoding("utf-8")解决乱码
                string line = "";
                string totaltxt = "";
                while (line != null)
                {
                    line = sr.ReadLine();
                    totaltxt = totaltxt + line;                  
                }
                textBox1.Text = totaltxt;
                sr.Close();
                fs.Close();

  • 相关阅读:
    JSON
    event flow
    for,for each,for in,for of
    history of program language
    px fr em rem
    正则符号
    DOM、BOM
    web布局
    grid
    初学python环境安装
  • 原文地址:https://www.cnblogs.com/greencolor/p/1752675.html
Copyright © 2011-2022 走看看