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
猜你喜欢
转载自blog.csdn.net/MeGoodtoo/article/details/81668053
今日推荐
周排行