zoukankan      html  css  js  c++  java
  • C#将代码中的信息保存为txt或ini文件

        这是我在使用坚石诚信的ET99产品时将信息写为ini文件的一段代码:

                FileStream fs = new FileStream("log.ini", FileMode.Append, FileAccess.Write);
                StreamWriter sw = new StreamWriter(fs);
                DateTime time = DateTime.Now;
                sw.WriteLine(time);
                sw.WriteLine("PID种子:" + strPIDseed);
                sw.WriteLine("SO PIN种子:" + strSOPINseed);
                sw.WriteLine("PID:" + strPID);
                sw.WriteLine("SO PIN:" + strSOPIN);
                sw.WriteLine("User PIN:" + strUserPIN); sw.WriteLine("*********************************");
                sw.Close();
                fs.Close();

  • 相关阅读:
    优化问题中什么形式有闭式解
    选择排序
    超算私房菜之集群搭建
    Scramble String
    Insert Interval
    Implement strStr()
    Permutation Sequence
    Insertion Sort List
    Restore IP Addresses
    Recover Binary Search Tree
  • 原文地址:https://www.cnblogs.com/JoshuaDreaming/p/1882051.html
Copyright © 2011-2022 走看看