110,571
社区成员
发帖
与我相关
我的任务
分享
static void Run()
{
if (!File.Exists(pathStreamWrite))
{
StreamWriter sw = File.CreateText(pathStreamWrite);
sw.WriteLine("测试数据");
sw.Close();
}
else
{
using (StreamWriter sw = new StreamWriter(pathStreamWrite, true))
{
sw.WriteLine("测试数据");
}
}
}
if (!File.Exists(pathStreamWrite))
{
File.Create(pathStreamWrite);
}
using (StreamWriter sw = new StreamWriter(pathStreamWrite, true))
{
sw.WriteLine("测试数据");
}
这里有问题!!!