[C#] 纯文本查看 复制代码 namespace ConsoleApplication1{
class Program
{
static void Main(string[] args)
{
string openfile01 = "D:\\C#\\123.xls";
string[] list = openfile01.ToLower().Split('|');
string result = "";
for (int i = 0; i < list.Length; i++)
{
if (list.Contains("@") || list.Contains("其他"))
{
}
else
{
result += list + "\r\n";
}
}
//StreamWriter sw = new StreamWriter(@"D:\a.txt");
StreamWriter sw = new StreamWriter("E:\\CO24.xls", false, System.Text.Encoding.UTF8);
sw.WriteLine(result);
sw.Close();
}
}
}
Error 1 The type or namespace name 'StreamWriter' could not be found (are you missing a using directive or an assembly reference?)
|