public static List<string> ReadList(string path, System.Text.Encoding encode)
{
List<string> result = new List<string>();
string s = "";
using (StreamReader sr = new StreamReader(path, encode))
{
while ((s = sr.ReadLine()) != null)
{
result.Add(s);
}
}
return result;
}
一行一行读取TXT数据并返回List
最新推荐文章于 2022-08-05 14:54:06 发布