/// <summary> /// 读取config文件内容 /// </summary> /// <param name="Path">文件地址</param> public void ReadConfigContent(string Path) { FileStream fs1 = new FileStream("1.conf", FileMode.Open); StreamReader sr = new StreamReader(fs1,Encoding.GetEncoding("GB2312")); string str1 = sr.ReadToEnd(); }
原文:https://www.cnblogs.com/siyunianhua/p/15346438.html