有没有可能用字符串替换字符的方法,例如替换'\x0A'
为"\r\n"
。这是我的代码,老实说,我找不到将其放入的方法,更不用说该Replace
功能不允许String.Replace(Char, String)
或String.Replace(String, Char)
StreamWriter wwrite = new StreamWriter(sfd.FileName, false, Encoding.GetEncoding("EUC-JP"));
for (int i = 0; i < listView1.Items.Count; ++i)
{
wwrite.WriteLine((i + 1).ToString() + "^" + listView1.Items[i].SubItems[3].Text);
}
wwrite.Close();