/// <summary>
        /// 读取config文件内容
        /// </summary>
        /// <param name="Path">文件路径</param>
        public void ReadConfigContent(string path)
        {
            FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
            StreamReader sr = new StreamReader(fs, Encoding.Default);
            string content = sr.ReadToEnd();
            string[] ContentLines = content.Split(
                new string[] { "\r\n" },
                StringSplitOptions.RemoveEmptyEntries
                )
                .Where(x=> !x.Contains("#")).ToArray();
            int count = 0;
        }

 

相关文章:

  • 2021-06-01
  • 2021-05-18
  • 2022-12-23
  • 2021-07-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-14
  • 2022-12-23
  • 2021-09-12
  • 2022-02-23
  • 2021-11-06
  • 2022-12-23
  • 2021-11-11
相关资源
相似解决方案