我逐行阅读文本文件,到目前为止一切顺利。我只是用这个:
using (StreamReader sr = new StreamReader(this._inFilePath))
{
string line;
int index = 0;
// Read and display lines from the file until the end of
// the file is reached:
while ((line = sr.ReadLine()) != null)
{
//skip empty lines
if (line == "")
{
continue;
}
}
}
现在我注意到我可能需要在阅读文件后将其转换为 Unicode。它是如何完成的?有人使用 Convert 类吗?