我想tempstring
从 output.txt 文件中删除行
File.Copy(words, Npath);
StreamReader temp = new StreamReader(Npath, Encoding.UTF8);
string tempstring = temp.ReadToEnd();
string[] temp3 = tempstring.Split(',');
temp.Close();
StreamWriter sW = File.AppendText(Npath);
string remove = tempstring.Replace(tempstring," ");
foreach (string item in temp3)
{
string str = item.TrimStart().TrimEnd();
string newStr = "<addr-line>" + str + "</addr-line>";
sW.WriteLine(newStr);
}
sW.Close();
输出 .txt 文件显示
Marko Kostic, 诺维萨德大学技术科学学院, Trg D. Obradovica 6, 21125 Novi Sad, 塞尔维亚
<addr-line>Marko Kostic</addr-line>
<addr-line>Faculty of Technical Sciences</addr-line>
<addr-line>University of Novi Sad</addr-line>
<addr-line>Trg D. Obradovica 6</addr-line>
<addr-line>21125 Novi Sad</addr-line>
<addr-line>Serbia</addr-line>
我想删除代码中tempstring
来自输出文件的粗体段落
有什么建议么?